tags:

views:

110

answers:

1

I've been playing with the SetupApi on Windows 2003 over the last couple of days, and I'm seeing a bunch of errors I'm not expecting. For example, if I pass GUID_NULL to SetupDiGetClassDescription, it returns FALSE and GetLastError() returns 0xE0000206.

The GUID_NULL came from SetupDiEnumDeviceInfo; I'm not doing this deliberately.

I've also seen error 0xE0000209. Where are these "0xE" error values declared, defined or documented?

A: 

Turns out that they're in SetupAPI.h, but disguised:

#define ERROR_INVALID_CLASS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x206)

(and, in WinNT.h)...

#define APPLICATION_ERROR_MASK       0x20000000
#define ERROR_SEVERITY_ERROR         0xC0000000
Roger Lipscombe