LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to monitor USB ports?

I want to monitor USB port for insert & Removing of mass storage media or daq card and also want to monitor DVD drive. Please help me..

Thanks in advance

0 Kudos
Message 1 of 3
(4,038 Views)

Hello Devaseelan,

 

        If you want to receive a message when the USB has been plugged in or off, you can use the "wndproc" windows procedure (http://msdn.microsoft.com/en-us/library/ms632593.aspx)

 

      If the implementation is through .Net, you can override this wndproc process, but when it comes to LabVIEW  my recommendation is to implement it through  Windows Message Queue Library

 

 

AshwiN,

0 Kudos
Message 2 of 3
(4,007 Views)

If you use the Windows Message Queue Library as suggested (and I agree it's probably the easiest way to do it), you'll want to listen to the WM_DEVICECHANGE event. The readme contained within the archive lists the values for the various messages.

0 Kudos
Message 3 of 3
(3,983 Views)