G
Guest
A question about GetPrivateProfileString
a section in a .ini file , for example
[server]
ip = 192.168.1.112
....
i want to get the ip value by using GetPrivateProfileString() function.
the code is :
char szBuffer[NAX_BUFFER_LEN];
szBuffer[0]=0;
if
:GetPrivateProfileString("GameServer1", "GameServerIp",\
NULL, szBuffer, sizeof(szBuffer), szPath)>0)
{
m_ip.SetWindowText(szBuffer);
}
i get it successfully.
however, when i modify the ip's value manually, the value returned by
GetPrivateProfileString() function is always less than 0 . Can you
tell me why?
thanks in advance
a section in a .ini file , for example
[server]
ip = 192.168.1.112
....
i want to get the ip value by using GetPrivateProfileString() function.
the code is :
char szBuffer[NAX_BUFFER_LEN];
szBuffer[0]=0;
if
NULL, szBuffer, sizeof(szBuffer), szPath)>0)
{
m_ip.SetWindowText(szBuffer);
}
i get it successfully.
however, when i modify the ip's value manually, the value returned by
GetPrivateProfileString() function is always less than 0 . Can you
tell me why?
thanks in advance