There are a few Windows API functions for this. The one you want is probably GetPrivateProfileString. Microsoft's documentation on this function may be found at
Assuming you know the section and tag name, it is very simple. For example, to read the following information
[My Section]
User Name=GLEASON
you just need to use the API noted by Keith Brautigam as follows (the third parameter is default data that will be copied into your buffer if the tag is not found or has no data after the = sign):
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.