Which library is used to manipulate the windows registry in c? Is it there any doc about it?
Thanks
Which library is used to manipulate the windows registry in c? Is it there any doc about it?
Thanks
Just use the Win32 registry API.
bit∙hub [bit-huhb] n. A source and destination for information.
But, don't you need a Microsoft Visual environment to use it?
I think you just need the platform SDK installed.
bit∙hub [bit-huhb] n. A source and destination for information.
Mmm.. I really don't know, I'm not a Windows native programmer, if I have the SDK installed, how can I include the libraries?
Biggest problem with Registry API is the naming conventions, the names used for certain entities in the api. Be sure to understand that first. Then the rest will come much easier.
I remember staring at some example code and the documentation and I couldn't connect one with the other. I felt stupid very often while I was dealing with the registry.
Read this post by Raymond Chen and try to read the comments too.
---
I see while I was writing this, you two were talking about some very basic issues. You must have some C compiler for Windows? If you can't link the library to your exe, you can always use LoadLibrary() and GetProcAddress().
Last edited by idelovski; 09-02-2009 at 04:46 PM.
What compiler are you using?
bit∙hub [bit-huhb] n. A source and destination for information.
DJGPP, which one will you recommend me?
That appears to be a DOS compiler. I suggest you use MS Visual Studio Express which is free.
bit∙hub [bit-huhb] n. A source and destination for information.
Thanks, I'll take a look at it, it's a DOS compiler, but I was thinking to use GTK+ with it.. but well, I think I'll have to use the Visual Studio
The mingw port of gcc is also an excellent compiler for Windows, plus if you're using C++, it's more standard-compliant than the Microsoft compiler. At any rate, to use the API any Windows compiler will do - just include windows.h.
Hmm. Maybe someone should have informed MS about that.
Seriously, though, I don't think Elysia was implying that. The purpose of the registry isn't just to provide a database for the system but in fact all applications. Naturally, there are probably some "common sense" exceptions that should be observed (for the sake of system performance, at least) such as not storing massive amounts of data there (eg: code, output from log files, etc), but using it to store important application settings and the like makes good sense for a number of reasons (more uniform access for your application, the system, other programs, etc, less complex logic for storing/retrieving database-centric data, etc). The main thing though, is just to be consistent, and to be very careful not to accidentally overwrite system-critical data, obviously.