LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Capturing events of an ActiveX component in CVI5.01

Has anybody tried to capture an ActiveX component event in a CVI application
?

for example I've created a new instance of the Internet Explorer application
from the CVI , using the ActiveX Automation controler I choosed the Microsoft
internet controls then I selected IWebBrowser2 and the IWebBrowserEvents2
classes and generated the fp file for the CVI.
Under the the IWebBrowserEvents2 I see there are events fucntion for example
OnQuit, and I wanted my CVI app. to attach the quit event when the user closes
the IE window.
Now at this point I expected to find some mechanism that let me to install
some callback function where I can put my customised code to the quit event,
somehow I have to tell the IE to call
my function whenever the OnQuit callback
function is attached and I don't know how to do this.
0 Kudos
Message 1 of 4
(3,352 Views)
------ Daniel wrote -> Now at this point I expected to find some mechanism
that let me to install
some callback function where I can put my customised code to the quit event,
somehow I have to tell the IE to call my function whenever the OnQuit
callback
function is attached and I don't know how to do this


======================================================
Hi Daniel,
My answer may not be very helpful but capturing ActiveX control event in CVI
may not be an easy ( and practical) task. The ONLY known solution that I
believe is to create ActiveX container which CVI probably is yet not.

Hope this helps.

Regards.

Rishipa
Pl. reply only to this NG
======================================================
0 Kudos
Message 2 of 4
(3,352 Views)
Daniel,

Have you tried the function CA_RegisterEventCallback function? (I am using
CVI 5.5)

This function is used by the functions generated by the Automation
Controller Instrument Driver Wizard.
It is not intended to be used directly.

It basically registers a callback for an ActiveX Automation server object
event.
To register the callback, you must specify the CAObjHandle of the server
object from which you want to receive events.

With CVI 5.5, there is an example for IE with Active X under the
samples/activeX directory.

Hope this helps,

Azucena

"Daniel Bentolila" wrote in message
news:39100979@newsgroups.ni.com...
>
> Has anybody tried to capture an ActiveX component event in a CVI
application
> ?
>
> for example I've created a new instance of t
he Internet Explorer
application
> from the CVI , using the ActiveX Automation controler I choosed the
Microsoft
> internet controls then I selected IWebBrowser2 and the IWebBrowserEvents2
> classes and generated the fp file for the CVI.
> Under the the IWebBrowserEvents2 I see there are events fucntion for
example
> OnQuit, and I wanted my CVI app. to attach the quit event when the user
closes
> the IE window.
> Now at this point I expected to find some mechanism that let me to install
> some callback function where I can put my customised code to the quit
event,
> somehow I have to tell the IE to call my function whenever the OnQuit
callback
> function is attached and I don't know how to do this.
0 Kudos
Message 3 of 4
(3,352 Views)
Thank you for you mail,

After I read this article

http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/610540bb3ea4ebdd862568960055e498?OpenDocument

I realized that ActiveX events are not supported on CVI 5.01 at all since
its introduced as a new feature of CVI 5.5



"Azucena" wrote:
>Daniel,>>Have you tried the function CA_RegisterEventCallback function?
(I am using>CVI 5.5)>>This function is used by the functions generated by
the Automation>Controller Instrument Driver Wizard.>It is not intended to
be used directly.>>It basically registers a callback for an ActiveX Automation
server object>event.>To register the callback, you must specify the CAObjHandle
of the server>object from which you want to receive events.>>W
ith CVI 5.5,
there is an example for IE with Active X under the>samples/activeX directory.>>Hope
this helps,>>Azucena>>"Daniel Bentolila" wrote in message>news:39100979@newsgroups.ni.com...>>>>
Has anybody tried to capture an ActiveX component event in a CVI>application>>
?>>>> for example I've created a new instance of the Internet Explorer>application>>
from the CVI , using the ActiveX Automation controler I choosed the>Microsoft>>
internet controls then I selected IWebBrowser2 and the IWebBrowserEvents2>>
classes and generated the fp file for the CVI.>> Under the the IWebBrowserEvents2
I see there are events fucntion for>example>> OnQuit, and I wanted my CVI
app. to attach the quit event when the user>closes>> the IE window.>> Now
at this point I expected to find some mechanism that let me to install>>
some callback function where I can put my customised code to the quit>event,>>
somehow I have to tell the IE to call my function whenever the OnQuit>callback>>
fun
ction is attached and I don't know how to do this.>>
0 Kudos
Message 4 of 4
(3,352 Views)