Lachlan MacColl
asked on
Problem with old GetPrivateProfileString
I am using GetPrivateProfileString to retrieve some data for a program I am working on. Can anyone tell me why the code below does not work as well as which it often breaks at runtime.
LPCTSTR lpAppName2;
LPCTSTR lpKeyName2;
LPCTSTR lpDefault;
LPTSTR lpReturnedString;
DWORD nSize;
LPCTSTR lpFileName2;
GetPrivateProfileString(
lpAppName2 = TEXT ("Section11"),
lpKeyName2 = TEXT ("FirstKey1"),
lpDefault = TEXT ("String Not Found") ,
lpReturnedString ,
nSize ,
lpFileName2 = TEXT ("c:\\aa\\test2.ini")
);
Application->ProcessMessages();
ShowMessage(lpReturnedString);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You are welcome.
ASKER