A-Person-With-A-Unicode-Name wrote:
A question about GetPrivateProfileString
(snip stuff)
GetPrivateProfileString
(
"GameServer1",
"GameServerIp",
NULL,
szBuffer,
sizeof(szBuffer),
szPath
... when i modify the ip's value manually, the value returned by
GetPrivateProfileString() function is always less than 0 . Can you
tell me why?
That's strictly Microsoft Windows stuff. This is a C++ group, so this is
off-topic here. I'm setting followup to:
comp.os.ms-windows.programmer.win32
To learn more about "GetPrivateProfileString", highlight it in your source
and hit F1. That should launch your MSDN and set it to display info on this
function. (Assuming you're using Visual Studio and have MSDN installed.)
MSDN says that the third parameter is not allowed to be NULL, so you're
abusing the function. Provide a valid default string and see what happens.
For more info, ask in the group I mention above. Also, read MSDN. Also,
get Charles Petzold's book "Programming Windows".
--
Cheers,
Robbie Hatley
Tustin, CA, USA
lonewolfintj at pacbell dot net (put "[ciao]" in subject to bypass spam filter)
http://home.pacbell.net/earnur/