Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Win API / July 2009



Tip: Looking for answers? Try searching our database.

GetPrivateProfileInt returns default value.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GL Starter - 14 Jul 2009 12:32 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.