Using GetPrivateProfileString from kernel32.dll

Valentin Schneider

I'm working on an UWP app meant to be running on a Raspberry Pi. I need to read data stored in .ini files - I know Microsoft would like me to use xml, but I am required to use ini.

I've succesfully used GetPrivateProfileString (following this : http://www.codeproject.com/Articles/1966/An-INI-file-handling-class-using-C) to read values from an ini file with a "standard" C# project.

However, this does not seem to be working on an UWP C# project. I don't have any error, simply that nothing happens if I try to read or write using the kernel32 functions.

What is happening ? Is it still possible to use these functions in an UWP app ? If not, will I have to write an ini-handling class myself ?

ventiseis

MSDN says:

Note This function is provided only for compatibility with 16-bit Windows-based applications. Applications should store initialization information in the registry.

I assume that the function is not avaliable on your target platform. You have to read and parse the INI file yourself.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

vba dll call writefile from kernel32 creates huge file

From Dev

Unexpected closure of Python program while using ReadProcessMemory from kernel32

From Dev

WriteConsoleOutput() from Kernel32 not displaying text

From Dev

Overriding calls from kernel32

From Dev

How to call GetTickCount64() from Kernel32.dll using PowerShell on Windows 10

From Dev

Running ASP.NET 5 on Nano Server throws "Unable to load DLL 'kernel32'"

From Dev

Need to fix this error: 'Can't find DLL entry point GetSystemInfo in kernel32'

From Dev

InterlockedExchange method of kernel32 not found when linking a dll to a c# project

From Dev

Kernel32 not found when using FFmpeg.Autogen 4.1.0.2 in Mono/Linux

From Dev

Is there a wsprintf()-type function from a low-level library such as kernel32.dll or ntdll.dll?

From Dev

Creating DLL and using it from Excel

From Java

Using Windows DLL from Linux

From Dev

Using a DLL exported from D

From Dev

VBA GetPrivateProfileString

From Dev

Is there a Linux equivalent module and function for LoadLibrary() from kernel32.dll that i can call from .Net Core?

From Dev

Built exe using Cygwin on Win10, but getting errors regarding kernel32.dll

From Dev

How to create an import library for kernel32.dll using a .def file on x86?

From Dev

how to exclude opengl32sw.dll from pyqt5 library when using pyinstaller?

From Dev

Get const array from DLL using ctypes

From Dev

Call fortran dll from java using JNI

From Dev

using callback from delphi dll with c++

From Dev

Using DLL in ExcelVBA made from C++

From Dev

Using JNIEnv from a nasm-created dll

From Dev

Access 64 bit DLL from 32 bit DLL

From Dev

What is this icon from shell32.dll

From

Calling kernel32's ReadProcessMemory in Go

From Dev

windbg help missing kernel32 function

From Dev

Qt using .dll in .dll

From Dev

GetOverlappedResultEx could not be located in kernel32.dll

Related Related

  1. 1

    vba dll call writefile from kernel32 creates huge file

  2. 2

    Unexpected closure of Python program while using ReadProcessMemory from kernel32

  3. 3

    WriteConsoleOutput() from Kernel32 not displaying text

  4. 4

    Overriding calls from kernel32

  5. 5

    How to call GetTickCount64() from Kernel32.dll using PowerShell on Windows 10

  6. 6

    Running ASP.NET 5 on Nano Server throws "Unable to load DLL 'kernel32'"

  7. 7

    Need to fix this error: 'Can't find DLL entry point GetSystemInfo in kernel32'

  8. 8

    InterlockedExchange method of kernel32 not found when linking a dll to a c# project

  9. 9

    Kernel32 not found when using FFmpeg.Autogen 4.1.0.2 in Mono/Linux

  10. 10

    Is there a wsprintf()-type function from a low-level library such as kernel32.dll or ntdll.dll?

  11. 11

    Creating DLL and using it from Excel

  12. 12

    Using Windows DLL from Linux

  13. 13

    Using a DLL exported from D

  14. 14

    VBA GetPrivateProfileString

  15. 15

    Is there a Linux equivalent module and function for LoadLibrary() from kernel32.dll that i can call from .Net Core?

  16. 16

    Built exe using Cygwin on Win10, but getting errors regarding kernel32.dll

  17. 17

    How to create an import library for kernel32.dll using a .def file on x86?

  18. 18

    how to exclude opengl32sw.dll from pyqt5 library when using pyinstaller?

  19. 19

    Get const array from DLL using ctypes

  20. 20

    Call fortran dll from java using JNI

  21. 21

    using callback from delphi dll with c++

  22. 22

    Using DLL in ExcelVBA made from C++

  23. 23

    Using JNIEnv from a nasm-created dll

  24. 24

    Access 64 bit DLL from 32 bit DLL

  25. 25

    What is this icon from shell32.dll

  26. 26

    Calling kernel32's ReadProcessMemory in Go

  27. 27

    windbg help missing kernel32 function

  28. 28

    Qt using .dll in .dll

  29. 29

    GetOverlappedResultEx could not be located in kernel32.dll

HotTag

Archive