Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: ActiveX form and LabView issue



Permlink Replies: 2 - Last Post: Sep 11, 2014 5:54 PM Last Post By: Gregor Brandt
Gregor Brandt

Posts: 108
Registered: 12/9/09
ActiveX form and LabView issue
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 11, 2014 4:49 PM
I have been fighting this issue for a while and finally figured out what was going on...

I have an ActiveX form using DAX that has 5 events. When testing the form in C++Builder or Visual Studio C++ it works perfectly, when running under LabVIEW only the first registered event works, all others return that they cannot connect.

With help from National Instruments, I have traced it down to TConnectionPoint in SystemWin.ComObj.pas failing due to TActiveXCtrl.Initialize in Vcl.AxCtrls.pas calling TConnectionPoint.CreateConnectionPoint() with TConnectionKind == ckSingle. ckSingle is used automatically for EventSinks.

I understand the logic behind this, an ActiveX Form can only be owned by one parent window, so there should only be one event sink.

However, in discussion with National Instruments it appears that they create an Event sink per event, and they have no intention of changing it.

So, long story short, what is the best (and/or) the easiest way to change this ckSingle to ckMulti. If I change it while debugging, everything works perfectly, so it seems arbitrary that ckSingle is used.

I have RAD Studio XE6 and don't really want to recompile all the Delphi code, but I am open to adding a delphi file to my C++Builder project if I have to.

Thanks,
Gregor
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: ActiveX form and LabView issue
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 11, 2014 5:23 PM   in response to: Gregor Brandt in response to: Gregor Brandt
Gregor wrote:

So, long story short, what is the best (and/or) the easiest
way to change this ckSingle to ckMulti.

If you are not compiling your app with Runtime Packages enabled, you can
make a copy of Vcl.AxCtrls.pas, edit it, and then add the copy to your project.
It will override the original during the linking stage.

--
Remy Lebeau (TeamB)
Gregor Brandt

Posts: 108
Registered: 12/9/09
Re: ActiveX form and LabView issue
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 11, 2014 5:54 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
Gregor wrote:

So, long story short, what is the best (and/or) the easiest
way to change this ckSingle to ckMulti.

If you are not compiling your app with Runtime Packages enabled, you can
make a copy of Vcl.AxCtrls.pas, edit it, and then add the copy to your project.
It will override the original during the linking stage.

--
Remy Lebeau (TeamB)

That allows the test code from National Instruments to register the events, I will let you know if it works in LabVIEW.

Thanks,
Gregor
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02