I want to write a simple console application program that will read a registry key. I want to use the RegOpenKeyEx, RegQueryKeyEx, and RegCloseKey registry API functions. I am having trouble figuring out how to get started (what files to include and such). I started a new console application project (in VC++ 6.0) and chose to create a simple "Hello World" program. From there, I tried to include <winreg.h>, but when I tried to compile it, the compiler reported finding an error in winreg.h (something like it didn't find a semicolon where it thought there should be one). I don't expect errors to be in standard header files that come with VC++, so I am assuming that I am doing something wrong. Can someone explain the right way to include header files that will enable me to use registry functions. Simple sample code would be great.