May 20, 2010 at 5:04pm
szPath needs to be a buffer. At the moment, it's an uninitialised pointer.
May 20, 2010 at 5:15pm
szPath is always being set to the default now.
1 2 3 4
|
char szPath[MAX_PATH];
DWORD Size;
Size = GetPrivateProfileString("Global", "Path", "Default", szPath, sizeof(szPath), szDir);
MessageBox(0, szPath, "", 0);
|
1 2
|
[Global]
Path=H:\Program Files\Diablo II\Game.exe
|
Edit:
Weird, if I launch the program manually, instead of hitting F5 in VS it works.
Last edited on May 20, 2010 at 5:24pm