Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Working with COM in PB

Hello All,

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:

Integer Rtn

OleObject oWS


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.


Former Member
Former Member replied

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?

0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question