General information
Category:
COM/DCOM and OLE Automation
I created an out-of-process COM .EXE. This EXE immediately creates a reference to a COM .DLL and assigns the reference to a property of the EXE (e.g., THIS.MyDLL = CREATEOBJECT('MYDLLCLASS'). When I create a reference to the EXE either programmatically or from the VFP command window I want to have a reference to the EXE which then has a reference to the DLL. All this works fine until I try to release the EXE. In the command window the reference to the EXE no longer exists (VARTYPE() = "U") but the process persists in task manager. If I do not get a reference to the DLL in the EXE, there is no problem releasing the EXE. If I create an exposed method in the EXE that explicitly releases the DLL reference (THIS.MyDLL = .NULL.) and call it from the Command Window before releasing the EXE all works fine. If I put this same code into the Destroy Event of the EXE it will not release.
Am I nuts? Is this the way this is supposed to work?
Rick Grinter
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only