Help! Release the COM Pointer
-
Someone help me out! On my old VB Application, I use set fvapp = createobject("fldview.application") to create the ole automation server, work on it and use set fvapp = nothing to close the server. It works perfect. when I convert to C#, since there is no way to free the fvapp, the server will be keep runing until my VB app close. How I force C# to close the external OLE server? using "fv = null" doesn't work. it close the server's interface, but the exe file is running still in the task list.
-
Someone help me out! On my old VB Application, I use set fvapp = createobject("fldview.application") to create the ole automation server, work on it and use set fvapp = nothing to close the server. It works perfect. when I convert to C#, since there is no way to free the fvapp, the server will be keep runing until my VB app close. How I force C# to close the external OLE server? using "fv = null" doesn't work. it close the server's interface, but the exe file is running still in the task list.
Try Marshal.ReleaseComObject()
-
Someone help me out! On my old VB Application, I use set fvapp = createobject("fldview.application") to create the ole automation server, work on it and use set fvapp = nothing to close the server. It works perfect. when I convert to C#, since there is no way to free the fvapp, the server will be keep runing until my VB app close. How I force C# to close the external OLE server? using "fv = null" doesn't work. it close the server's interface, but the exe file is running still in the task list.
A lot of exe COM servers expose a
fvapp.Quit
method. If that's not enough, try sending the WM_QUIT message.