sz204 sz204

Niner since 2007


  • UAC - What. How. Why.


    We have a COM based application written in C++, and have difficulty to make it work on Vista. Will you please give guidance?

    Our application talks to a COM exe, we also have a MMC snap-in talks to this COM exe, i.e. the application communicate with MMC(snap-in) via this COM exe. 

    Both the application and MMC(Snap-in) can start an instance of the COM exe if non-existence, and then share between each other.

    On Vista,  if the COM exe is started by either of them, the other one will fail to connect to the running COM exe, i.e. the code hr = GetActiveObject(...)  returns faiure.

    Following "Windows Vista Application Development Requirements for User Account Control Compatibility" document, I rebuilt the application embeding a manifest file with "level="requireAdministrator" uiAccess="false", the problem is gone.

    However, we do not want to give the application "Administrator" right. so I tried to embed the manifest file to the snap-in DLL. No effect, the problem returns, GetActiveObject(...) gives me failure.

    What is the best way to deal with this problem?

    Thanks in advance.