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
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:Code:int INI = GetPrivateProfileInt( "app", "key", 0, "C:\\INI_TEST\\F1\\F2\\test.ini" );
So are anyone able to help with this little problem?Code:[app] key=1
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
Ah we-a blaze the fyah, make it bun dem!
mavi2k (03-05-2011)
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:
Last edited by mavi2k; 03-05-2011 at 03:58 AM.