I'm using a Com object. The com server should be used from a Windows service running as a specific account. But when running in this account it can't load the com, giving me this exception: Creating an instance of the COM component with CLSID {36998A63-857C-4B87-BC5E-72B7B3573F80} from the IClassFactory failed due to the following error: 80010105.
I tried changing the account to LocalSystem, that still fails, but changing the Windows service to log on as my own account works.
I guess it has to do with the com server being installed on my account. I install the com using "it's name.exe /regserver". I tried running the command as LocalSystem and it then fails with an assert. I don't have the code, so I don't know where the problem is, is there a permission I should should check? I also tried switching embed interop type in Visual Studio.
Any help?
I just found this, from our friend Hans Passant, on a Microsoft newsgroup thread. It's so good and pertinent I hope Hans won't mind me quoting it.
The error you are seeing is
RPC_E_SERVERFAULT
, which means that there has been a unhandled Win32 exception (e.g. perhaps an access violation) in the out-of-process COM server. If you have neither source code nor debug symbols for the COM server, you're unlikely to be able to diagnose this or fix it yourself. (EDIT: Unless it's something obvious like a mismatch of "bitness" on a 64-bit machine :-))Options: