Does anyone know where I can download only a library because the winreg.h that came with my compiler does not work(when I compile, 31 errors are pointed towards it.) By the way, I use Bloodshed.
Does anyone know where I can download only a library because the winreg.h that came with my compiler does not work(when I compile, 31 errors are pointed towards it.) By the way, I use Bloodshed.
You could try to reinstall the compiler... or read the FAQ
-Govtcheez
[email protected]
Or do a google search:
http://www.google.co.uk/search?q=%22...22&hl=en&meta=
Thanks
TNT
TNT
You Can Stop Me, But You Cant Stop Us All
Bloodshed's DevC++ comes with MinGW version 295.2 The latest version of the mingw compiler is 295.3(stable) and is available as a single mingw1.1 release. Go to:
http://www.mingw.org for details
(I think there's a link to a SourceForge proj).
Note that the directory structure of DevC++ and Mingw are different so install it to a different directory and just copy the headers, libs etc to their repective DevC++ directories. Or you may wish to leave the original dev distribution intact and install the latest mingw into a different directory and compile from the cmd line.
This still may fail as the latest mingw release still has many incomplete windows (and a few other) headers.
I didn't know about winreg.h, though. If, after getting the latest mingw headers you still get errors, would you mind re-posting? Maybe we could work out a fix...?
here's the code
Code:#include <iostream.h> #include <winreg.h> int main() { TCHAR myregval[]="Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explor er\\NoActiveDesktopChanges"; LONG checker=RegDeleteValue(HKEY_CURRENT_USER,myregval) if (!checker) cout<<"Delete of "<<myregval<<" successful"; return 0;}
sorry about bad indention. The copy and paste method doesn't work to great on this board.
I just checked the headers (both the DevC and mingw 295.3) and both seem to be fine.
I think that perhaps you should:
#include <windows.h>
In this case you probably won't have to #include winreg.h at all as it will probably #include it somewhere along the line.
If that fails simply #include winreg.h after #include <windows.h> and recompile.
I suspect one or the other will work ok.
I hope that helps.
Thanks, all I had to do was include windows.h and not winreg.h. I never thought of doing that. Boy do I feel stupid.