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

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!

René Ullrich Accepted Answer Pending Moderation
  1. Friday, 31 August 2018 09:46 AM
  2. PowerBuilder
  3. # 1
0
Votes
Undo

Have you used DisconnectObject() ?

Comment
There are no comments made yet.
Aron Cox Accepted Answer Pending Moderation
  1. Friday, 31 August 2018 10:06 AM
  2. PowerBuilder
  3. # 2
0
Votes
Undo

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
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. Chris Pollach @Appeon
  2. Saturday, 1 September 2018 01:57 AM
Thanks Chris, shame as I have to compile the dll many, many times a day while I test it and fix bugs etc.
  1. Aron Cox
  2. Saturday, 1 September 2018 11:02 AM
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. Chris Pollach @Appeon
  2. Saturday, 1 September 2018 11:32 AM
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.