GetPrivateProfileInt full path problem
Ohai.
So, i wanted to read an initialization file key value, but it wants a full path name to it. The GetFullPathName function returns a path like this:
"C:\bla\bla2\hurr\durr\test.ini".
The GetPrivateProfileInt lpFileName only accepts paths like:
"C:\\bla\\bla2\\hurr\\durr\\test.ini" or
"C:\\bla/bla2/hurr/durr/test.ini".
I do NOT want to put it under the windir (if the parameter does not contain a full path to the file, it search for it under windows directory).
GetPrivateProfileInt:
test.ini file:
So are anyone able to help with this little problem?
Thanks.
So, i wanted to read an initialization file key value, but it wants a full path name to it. The GetFullPathName function returns a path like this:
"C:\bla\bla2\hurr\durr\test.ini".
The GetPrivateProfileInt lpFileName only accepts paths like:
"C:\\bla\\bla2\\hurr\\durr\\test.ini" or
"C:\\bla/bla2/hurr/durr/test.ini".
I do NOT want to put it under the windir (if the parameter does not contain a full path to the file, it search for it under windows directory).
GetPrivateProfileInt:
Code:
int INI = GetPrivateProfileInt( "app", "key", 0, "C:\\INI_TEST\\F1\\F2\\test.ini" );
Code:
[app] key=1
Thanks.
