When I first try to register our ActiveX component such as htmlsnapshot, an error is shown,”DllRegisterServer in xxxx.dll failed.Return code was:0×80070005″.
0×80070005 means “Access Denied”, but I’ve been an administrator. I think this is related to the new security model in vista.
After doing some research, here is the correcy way to do so:
To register activex control to local machine(not only current user) successfully, developers must right click on “Command Prompt” in Accessories and click “Run as Administrator”, then run “regsvr32 foo.dll” in the command window.
It’s due to Vista’s new feature, not a activex’s bug