GetPrivateProfileInt full path problem

Posts 1–3 of 3 · Page 1 of 1
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:
Code:
int INI = GetPrivateProfileInt( "app", "key", 0, "C:\\INI_TEST\\F1\\F2\\test.ini" );
test.ini file:
Code:
[app]
key=1
So are anyone able to help with this little problem?

Thanks.
It returns it as "C:\\bla\\bla2\\hurr\\durr\\test.ini" but when you print it with cout or printf it'll only print one \ because of the escape sequences
Nevermind this btw, i noticed that it returned wrong path to my release folder, every other folder work...
Really strange.
Ty for your answer Demon anyways.

Nevermind this btw, i noticed that it returned wrong path to my release folder, every other folder work...
Really strange.
Ty for your answer Demon anyways.

Nevermind this btw, i noticed that it returned wrong path to my release folder, every other folder work...
Really strange.
Ty for your answer Demon anyways.
Image:


Nevermind this btw, i noticed that it returned wrong path to my release folder, every other folder work...
Really strange.
Ty for your answer Demon anyways.
Image:
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Talk with us