Link to home
Start Free TrialLog in
Avatar of andrewjackson
andrewjackson

asked on

aunch COM server from Control Panel Applet (.cpl) (or DLL?)

In the constructor (not FormCreate) of the main form of a D5 appl I launch a local, out-of-process COM sever created in D4.  This all works fine but I'm now
trying to convert the D5 application to a control panel applet - which causes
problems.  The code base for standard application and applet are exactly the same.

Initially I got 'Coinitialize has not been called' errors when trying to
launch the server which I've addressed by calling Coinitialize.  However,
now at the point where I call coMyServer.Create the system just locks up.
If I comment out this code out the applet runs as expected.  There are
definately no issues with the COM server.

Since its a control panel applet its effectively now a type of DLL (.cpl).
Could it be that you can't launch a COM server from a DLL / CPL?  Is there a
workaround?


ASKER CERTIFIED SOLUTION
Avatar of OpitzS
OpitzS

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of andrewjackson
andrewjackson

ASKER

Nice solution.  I'd actually given up on this one but am tempted to give it another go now :-)