ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event when network changes

Hello all,

 

I am trying to figure how to use an activex callback when the computers(windows 7) network connection changes.

I am able to access and use properties of the NETWORKLIST.INetworkListManager class but I am not able to get the Reg Event Callback to work for NETWORKLIST.INetworkListManager.NetworkConnectivityChanged.

 

Does anyone have experience with this class or more ActiveX knowledge to get this working?

Perhaps there is another more commonly used method to see network changes without polling?

 

I hope I have provided enough details to get some help. Thank you for your time.

0 Kudos
Message 1 of 5
(3,945 Views)

@Wandern wrote:

Hello all,

 

I am trying to figure how to use an activex callback when the computers(windows 7) network connection changes.

I am able to access and use properties of the NETWORKLIST.INetworkListManager class but I am not able to get the Reg Event Callback to work for NETWORKLIST.INetworkListManager.NetworkConnectivityChanged.

 

Does anyone have experience with this class or more ActiveX knowledge to get this working?

Perhaps there is another more commonly used method to see network changes without polling?

 

I hope I have provided enough details to get some help. Thank you for your time.


I cannot get this working in LabVIEW 2013 32-bit.

Not sure why.

 

I am able to get the callback to work in C# Express 2010.

 

 

0 Kudos
Message 2 of 5
(3,887 Views)

Yeah, I am also able to get it to work using examples found for c# and c++, but no luck using labview (2012 here). It has stumped me.

0 Kudos
Message 3 of 5
(3,873 Views)

One thing I noticed in your VI is that your Event Structure isn't in a WHILE loop.

 

You might create a Timeout case and "read" the network status as a workaround.

0 Kudos
Message 4 of 5
(3,862 Views)

Yeah, polling isn't a problem. There are a few solutions for that, but I was wanting to avoid doing it as it is more expensive than using a callback event.

0 Kudos
Message 5 of 5
(3,848 Views)