Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WritePrivateProfileString
Message
De
21/08/1998 08:34:48
 
 
À
21/08/1998 01:14:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00128327
Message ID:
00128721
Vues:
57
>>>>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
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform