1. Aron Cox
  2. PowerBuilder
  3. Tuesday, 21 January 2020 11:51 AM UTC

I have a COM Wrapped .NET Chart control I have been using for years in PowerBuilder. (Thank Bruce Armstrong!)

I have noticed that when I put my control onto a window, and it seems to be only windows, not user objects, some binary code is embedded at the bottom of the window. If I upgrade my control I have to make sure I go through all windows and remove and re-add it to get the latest version.

I recently added a method to my control called DllVersion, there is a private string variable that has the version of the control, the method just returns it.

If I delete the dll from my PC and call this method, after adding the control to a window, the version is returned. If I have forgotten to delete and re-add the control, the old version is returned. So it seems to me some of the code has been kept around somewhere?

Can anyone explain how all this works. I've always wanted to know what PowerBuilder is actually doing, what the extra bit of embedded code is, and how it know the value of a variable in an ActiveX control where the dll for that control has been deleted.

Thanks!

Aron Cox Accepted Answer Pending Moderation
  1. Wednesday, 22 January 2020 08:50 AM UTC
  2. PowerBuilder
  3. # 1

Well I'm officially confused. I can't replicate the strange thing I saw last week of deleting the dll and then still managing to get a returned value, but failing on any larger calls.

I am a 100% certain this happened because I spent hours fiddling with it, even rebooting in case things were held in memory somehow. But as of now it;s acting like you'd expect failing on the call to DllVersion when the dll is not there???

Oh well it's now really my question anyway. What I was wondering about is what is the binary that ends up in the window srw file and is there an easier way of updating to a newer version of a control than having to remove and re-add it on every window on which it is used?

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 21 January 2020 12:47 PM UTC
  2. PowerBuilder
  3. # 2

Hi,

"Kept around somewhere" ... yes, most probably in the GAC. (global assembly cache).

About having to remove and re-add the control again after doing changes:

This is probably due to changes in GUIDs of the functions declared in the type libraries. Maybe, when you compile the ActiveX in Visual Studio, the guids are 'auto generated'.

I have the same problem for similar visual activeX controls.

Comment
  1. Miguel Leeuwe
  2. Tuesday, 21 January 2020 13:35 PM UTC
Maybe that's where the binary part in your exported code might have something to do.

Maybe someone more expert can jump in.

cheers
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 21 January 2020 13:41 PM UTC
So after deleting the dll's, does the visual control still show correctly or is it like a "blank white square"?

If it's still correctly visible, I'd definitely think the dll is still being found.
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 21 January 2020 18:18 PM UTC
Just in case: maybe Agent Ransack does not find files, depending on access rights to folders?

Just do a "cd c:\", "c:" and "dir my_file.dll /s" from the administrator command prompt to be really sure.
  1. Helpful
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.