Module loaded but DllRegisterServer failed with error code 0x80070005
While recently monkeying around with registering some DLLs, I ran across this error message:
Looking at WinError.h (in the %ProgramFiles%\Microsoft SDKs\Windows\v6.0A\Include folder on my system) reveals that it’s just a fancy “you-don’t-have-permission-to-do-this” dialog box:
// // MessageId: E_ACCESSDENIED // // MessageText: // // General access denied error // #define E_ACCESSDENIED _HRESULT_TYPEDEF_(0x80070005L)
I simply switched to an account with administrative privileges and voila! No failure this time. But couldn’t these codes be run through FormatMessage or something similar for crying out loud! Of course there are always other ways to figure out what is going on though.