Working with COM in PB
I have created a COM wrapper dll for a webservice using C# which I want to call from PB (12.5.2 5609). My problem is that PB does not release the object after code has executed. Any ideas what am I doing wrong?
Here is my pb code:
oWS = CREATE OLEObject
Rtn = oWS.ConnectToNewObject ("myWS.class1") // Returns 0 = Success
Rtn = oWS.ProcessA () // Returns success
Rtn = oWS.DisconnectObject () // Returns 0 = Success
The DisconnectObject returns 0 but the object is still in memory.
I use ConnectToNewObject and DisconnectObject followed by a Destroy. However I have noticed that if I am running my application from the PB IDE it keeps the dll in memory, so I can't replace the dll with a new one until I exit from the IDE, whereas this isn't as issue on a built application.
Also, my ,NET cCOM wrapper objects are either registered in the registry or I uses side-by-side dlls with manifest files. Not sure how you are accessing yours?