Why is my vc 2008 windows program not working?

Dec 21, 2010 at 1:05pm
I recently wrote a windows program an debuggged it, but rather than it loading it threw an exception with the following message: The procedure enry point RegDeleteExW could be located in the dynamic link library ADVAPI32.dll. I verified that I had #included windows.h and that the ADVAPI32.lib was was linked. Please how can I resolve this problem?
Dec 21, 2010 at 1:28pm
There is no WIN32 function called RegDeleteKeyEx. The function is RegDeleteKey.

You must have supplied a definition for it if your program compiles and links.
Dec 21, 2010 at 2:07pm
closed account (z05DSL3A)
kbw,
RegDeleteKeyEx: http://msdn.microsoft.com/en-us/library/ms724847(v=vs.85).aspx

greatme,
What version of Windows are you using?
Last edited on Dec 21, 2010 at 2:11pm
Dec 21, 2010 at 2:54pm
I competely missed the boat on that one, but I have reproduced the problem.

I have many versions of the Platform SDK and Visual Studio on my box. The prototype appears in all the copies of WinReg.h except for the version that ships with VS 2003, that's the earliest VS I have on this box.

Also, RegDeleteKeyEx (A/W) appear in all the advapi32.lib instances, including VS 2003.

But ADVAPI32.DLL does not export an implementation of RegDeleteKeyEx on XP (which I'm running).

The declaration clearly should have been masked with #if WINVER > something, but it isn't.

In conclusion, RegDeleteKeyEx is declared but not implemented on XP.
Last edited on Dec 21, 2010 at 2:55pm
Topic archived. No new replies allowed.