JimKirby
asked on
Get data from .ini file?
I must be overlooking something really basic. I'm building a new version of an application that was using .ini files to store various data. But, when Setup installs my new version, I want to switch to using the Registry. I want Setup to read the .ini file data and copy it into the Registry.
Trouble is, I am having no luck finding a way to get VB5 to read from the .ini file! I first tried the GetSetting function, but no luck--just returns an empty string every time. Surely, there must be a way. Ideas, anyone?!
Trouble is, I am having no luck finding a way to get VB5 to read from the .ini file! I first tried the GetSetting function, but no luck--just returns an empty string every time. Surely, there must be a way. Ideas, anyone?!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
BTW, the lpAppName$ is the section name. ex. Desktop.
The value of the key you read is returned in the ReturnValue$ argument.
The value of the key you read is returned in the ReturnValue$ argument.
ASKER
This is good stuff! I would never have thought of the API call approach. Microsoft's VB documentation was surely no help at all. Thank you! jk
You are welcome.
Regards.
Regards.
ASKER
jk