tad0jazz
asked on
Help reading from INI file in Visual C++ 6.0
How do I read from an INI file in Visual C++ 6.0? I have experience with GetPrivateProfileString in VB 6.0, but not sure on what to do in C++. I assume I have to define the API appropriately, then I can simply call it just as I do in VB.
Any help would be very much appreciated. I will also search the knowledgebase.
Thanks,
Todd Doucet
Any help would be very much appreciated. I will also search the knowledgebase.
Thanks,
Todd Doucet
None yet. This is for an existing DLL that is fairly sophistocated; however, it has no facility built into it to read from an INI file. I would suggest reading from an XML file, but I don't know if that is possible with Visual C++ 6.0. I can read a line from a file with the existing code, so if I have to, I will modify that code to read the lines in and then parse out the value I need. It would be so much easier with the code to read values directly from an INI file, though.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for replying. You deserve the points for your effort, although I was able to locate similar information in the Knowledgebase. Next time I will search the Knowledgebase first and only ask a question if I cannot locate an answer from a previous post.
Thanks again for replynig.
tad0jazz
By the way, GetPrivateProfileString() worked as expected.
Thanks again for replynig.
tad0jazz
By the way, GetPrivateProfileString() worked as expected.
ASKER
If someone has a better suggestion, please feel free to respond.
Thanks,
tad0jazz