>>>>I have the syntax for using GetPrivateProfileString to read and INI file does anyone have the info for WritePrivateProfileString to write to an INI file?
>>>>
>>>>Thanks
>>>
>>>From George Tasker's INI file class:
>>>
>>>DECLARE SHORT WritePrivateProfileString IN Win32API;
>>> STRING cSection, STRING cEntry, STRING cString, STRING cFilename
>>>
>>>Use it to your hearts content, but George's class has so much functionality already built, I highly recommend downloading and using it directly.
>>
>>I downloaded it but I am having trouble using WritePrivateProfileString. It fails to write to the ini file. I get return codes of 1 and 0. Do you know what this means?
>>
>>Thanks
>
>Nope- George?
I'm not George, but it looks like the return codes are:
If non-zero: It worked.
If zero, an error occurred, and you need to call GetLastError to return an extended error code describing why it failed.
the prototype for GetLastError() is
DECLARE INTEGER GetLastError IN Win32API
The value returned by GetLastError() cn be checked against the errors in WINERRORS.H in VC++
hth,
Ed