What are the possibilities GetPrivateProfileInt returns, provided
default value, even my ini file and key value are exists.
When I put a messagebox to display the return value of
GetPrivateProfileInt I got the required value.
When I'm debugging my application with Msdev by attaching the
process,
I got GetPrivateProfileInt returns the nDefault.
I dont know what is inside of GetPrivateProfileInt.
// Getting value from ini file
int nRet = GetPrivateProfileInt( _T("RECT"), _T("Enable"),
200,
L"c:\\Config\
\RectConfig.ini");
what is wrong in my code.
Jim Mack - 14 Jul 2009 13:17 GMT
> // Getting value from ini file
> int nRet = GetPrivateProfileInt( _T("RECT"), _T("Enable"),
[quoted text clipped - 3 lines]
>
> what is wrong in my code.
It's written in C. This is a VB6 newsgroup.

Signature
Jim
Nobody - 14 Jul 2009 17:16 GMT
> What are the possibilities GetPrivateProfileInt returns, provided
> default value, even my ini file and key value are exists.
[quoted text clipped - 14 lines]
> \RectConfig.ini");
> what is wrong in my code.
As Jim Mack said, this is a VB6 or lower group, however, you are using a mix
of ANSI and Unicode strings, and the function is only seeing "c" as the file
name, so because it's not found, it's using the default value. Next time
please look for groups with "vc" in the name.