1. Aron Cox
  2. PowerBuilder
  3. Friday, 31 August 2018 09:33 AM UTC

I connect to a dll / ocx in PowerBuilder using ConnectToNewObject. That dll is held and locked until I exit from the PowerBuilder IDE (all versions). Is there anything I can do to unload the dll either in code, or when the application is closed but the IDE isn't?

I'm getting fed-up of having to close PowerBuilder down in order to recompile my dll ready to test again.

Thanks!

Aron Cox Accepted Answer Pending Moderation
  1. Friday, 31 August 2018 10:06 AM UTC
  2. PowerBuilder
  3. # 1

Just gave it a good test:

Turned off Auto Instantiate on my nvo then

  • Do a create on the nvo
  • Create of ole object
  • ConnectTONewObject the ole object
  • Do a call on a method in the ole object
  • DisconnectObject on the ole object
  • Destroy ole object
  • Destroy nvo
  • HALT CLOSE the application, leaving the PB IDE running

Go to Visual Studio, try to rebuild the dll in question, can't as Visual Studio says it is locked by PowerBuilder 2017. Close the PowerBuilder IDE, start a build, and all is now okay.

So DisconnectObject didn't seem to help :(

Any ideas are welcome :)

Comment
  1. Chris Pollach @Appeon
  2. Saturday, 1 September 2018 01:57 AM UTC
Hi Aaron;

If the DisconnectObject and Destroy commands did not help you unlock the DLL, then I think your stuck recycling the PB IDE on this one.

Regards ... Chris
  1. Helpful
  1. Aron Cox
  2. Saturday, 1 September 2018 11:02 AM UTC
Thanks Chris, shame as I have to compile the dll many, many times a day while I test it and fix bugs etc.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Saturday, 1 September 2018 11:32 AM UTC
I feel your pain ... been there, done that myself.

Please feel free to open a support ticket on this issue to improve the garbage collection on external DLLs / OCXs.
  1. Helpful
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Friday, 31 August 2018 09:46 AM UTC
  2. PowerBuilder
  3. # 2

Have you used DisconnectObject() ?

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.