Why not to use a simple method FileReadAll inifile, result PS. Specify 0 for the second parameter if using "GetPrivateProfileString" NULL for a pointer means 0. : I need to read the entire content of an ini file section. : I tried to use the kerbel32 function: DWORD GetPrivateProfileString( : LPCTSTR lpAppName, : LPCTSTR lpKeyName, : LPCTSTR lpDefault, : LPTSTR lpReturnedString, : DWORD nSize, : LPCTSTR lpFileName : ); : The problem is how to specify a NULL value for the second parameter (this : should force the function to read all the section content). : This solution doesn't work: Call "kernel32.dll", : "GetPrivateProfileString", "SLSSuSu", True, section, : 0, "", buffer, 1024, inifile, result : Any ideas? : Thank You for the attention.
|