I've been reading on working with the registry from the msdn, but there are so many functions, can someone point me to the fucntions i need for basic work with the registry, creating, up-dating and deleting keys.
thank you very much.
I've been reading on working with the registry from the msdn, but there are so many functions, can someone point me to the fucntions i need for basic work with the registry, creating, up-dating and deleting keys.
thank you very much.
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
The one's you'll be looking for are RegCreateKeyEx for creating keys if they don't exist/opening them if they do, RegQueryValueEx for getting values, RegSetValueEx for setting them and RegDeleteKey for deleting keys. Use RegCloseKey to release handles after use. Note that there is a difference between deleting keys and deleting values.
I'd love to show you an example but my code CDs are locked up 100 miles away at university. I'm home for Christmas...
what is the difference between RegOpenKeyEx and RegCreateKeyEx ?
i hope i'll make it before you get back to Uni.
Last edited by Devil Panther; 12-18-2004 at 01:38 PM.
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
RegOpenKeyEx will only open an existing key, whereas RegCreateKeyEx will open an existing or create a new one. You would use RegCreateKeyEx for something that you need to add to the registry. The other is for fetching an existing key.
but can i use RegCreateKeyEx for both without any worries?
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
Actually, yes. As I said, it will either create it or open it depending on whether or not it already exists.