Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

REGSAM error when compiling with winreg.h

Status
Not open for further replies.

crowbar6

Programmer
Nov 5, 2007
1
0
0
US
Ok, Long story short, I have been googling for a couple weeks now, and can't find ANY help on this. Any program I try to compile that uses winreg.h, I always get the same result:

--------------------Configuration: reg - Win32 Debug--------------------
Compiling...
reg.cpp
c:\program files\microsoft visual studio\vc98\include\winreg.h(36) : error C2146: syntax error : missing ';' before identifier 'REGSAM'
c:\program files\microsoft visual studio\vc98\include\winreg.h(36) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

reg.obj - 2 error(s), 0 warning(s)

------------------------------------------------------------


I also get the same error when using an older version of Borland C++ 5 with it's included headers, not visual c++'s.

I'm compiling on Windows XP Pro SP2. Thanks!
 
As far as I know, winreg.h is a low level windows system specific header (really it's part of SDK). It's not self-contained header - for example, it defines REGSAM type alias for ACCESS_MASK bit structure defined in other low level windows system header(s) - see winny.h for example. As usually, we use it (and others) via "high level" windows.h header.
 
Alas, misprint: winnt.h header (not winny.h;)...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top