none
CoCreateInstanceEX is failed with Error 0x80040111 [classfactory-cannot-supply-requested-class] RRS feed

  • Question

  • I have built my C++ executable in Visual Studio which runs as service. In my code I am calling CoCreateInstanceEx with CLSID of my executable with CLSCTX_ALL option. 

    CoCreateInsatnceEx() functions works fine when used on Windows 7 64 bit English OS but failed on Windows 2012 64bit English and Portuguese OS with error 0x80080005 "Server Execution Failed" and when I try to start service for my executable it gives error as in Subject line 0x80040111 [classfactory-cannot-supply-requested-class].

    I have tried following to resolve the problem but nothing helped :

    1) Registry entries to register my exe as service are correct and match to one on Windows 7 OS.

    2) DCOM for my exe. has been set up.

    3) Executable folder has full access permission and running as Administrator.

    4) Tried running Service under Local System Account with check and unchecked "Allow service to interact with Desktop" option under Log On tab.

    5) Tried unregistering regsitering exe and dependency components.

    6) Dependency Walker used but no missing DLL.

    7) Tried to use Process Monitor but couldn't find anything useful. there were many SUCCESS and NAME NOT FOUND which I think are ok and will not cause problems.

    I will really appreciate your response and suggestions.

    Regards,

    Shubhi

    Tuesday, November 7, 2017 11:37 AM

Answers

All replies