Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading From An INI File
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00664506
Message ID:
00664524
Views:
26
>Whats wrong here? I'm getting a data type mismatch error.
>
>LOCAL sRetVal, nSize, sReturn, nResult
>sRetVal = ""
>nSize = 254
>sReturn = SPACE(nSize)
>
>DECLARE INTEGER GetPrivateProfileString IN kernel32;
>STRING lpAppName,;
>INTEGER lpKeyName,;
>STRING lpDefault,;
>STRING @sReturn,;
>INTEGER nSize,;
>STRING lpFileName
>
>nResult = GetPrivateProfileString(sSectionName, sKeyName,;
>(#novalue#)", @sReturn, nSize, sFileName)
>

Kevin,

Here's the C++ declaration, followed by the translation
DWORD GetPrivateProfileString(
  LPCTSTR lpAppName,        // section name
  LPCTSTR lpKeyName,        // key name
  LPCTSTR lpDefault,        // default string
  LPTSTR lpReturnedString,  // destination buffer
  DWORD nSize,              // size of destination buffer
  LPCTSTR lpFileName        // initialization file name
);
DECLARE INTEGER GetPrivateProfileString IN Win32API;
  STRING @lpAppName, STRING @lpKeyName,;
  STRING @lpDefault, STRING @lpReturnedString,;
  INTEGER nSize, STRING @lpFileName
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform