Here's a good COM problem. I have a VB6 ActiveX EXE project that builds OK,
but I get the above error when I try to instantiate one of its classes from
a different EXE.
The error is also accompanied by an Event Log entry of ID 10000:
Unable to start a DCOM Server: {137DA12F-A721-45C3-9FD4-D44DE1B9E82A}.
The error:
"C:\AIM Tech\Server\MyExe.exe -Embedding is not a valid Win32
application. "
Happened while starting this command:
C:\AIM Tech\Server\MyExe.exe -Embedding
The -Embedding being one the standard command-line options pre-built into
any ActiveX EXE, just like -RegServer and -UnRegServer
This project used to work fine. Also, the same project builds and runs OK on
a different machine (the failing one is W2K Professional, and the working
one is W2K Server, but I can't believe this is important) Hence, my first
thought was that something was damaged in the registry on one machine.
Interestingly, it doesn't fail if I load-up the ActiveX EXE project into the
IDE, and it doesn't fail if I marshal it myself (i.e. by running the
associated command, including the -Embedding option, from a CMD prompt
before instantiating the class)
After a lot of trial and error, I looked at the CLSID entry for the class
being instantiated. Since the server's path contains spaces, I tried adding
quotes around the LocalServer32 sub-key, and it worked! However, my other
machine didn't need these quotes and the directory layout is identical.
Can anyone think of something I'm missing here?
Tony