Original Post
I am working a bit with Vista and the elevation moniker, but am having trouble properly registering my ATL class. I am just testing out some basic things currently, so I have a project setup via the AppWizards. It's just a simple ATL DLL with a single class in it. I selected the merge option in the ATL wizard so that I don't need to register two DLLs. When I create the class via CoCreateInstance, it works perfectly (yay, since I've never done much with this before). The class is created and I can use it properly, but without elevated privileges in Vista. If I use the CoCreateInstanceAsAdmin function that MicroSoft has supplied (which creates a string and passes it to CoGetObject to create the instance), I get an error code of 0x80040154, which means the class is not registered. I know the class is registered because it creates successfully via CoCreateInstance itself, but I'm guessing there is some additional threading or type lib registration that I am missing? Has anyone worked with this before? As a note, I have the UAC dialog coming up when I call CoCreateInstanceAsAdmin, so things are mostly going well, it see's my extra Elevation and LocalizedString in the register for that class, but it seems to fail half-way through. Anyone encounter this before? I searched the MSDN as well, I found one other instance where someone encountered this, but no solution for it. Thanks.