LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows Management Instrumentation

Does anyone have experience using WMI to enumerate com ports from CVI?

 

Thanks for any info anyone can provide.

 

Menchar

0 Kudos
Message 1 of 8
(3,839 Views)

Hi menchar,

 

I looked for some example code to accomplish this, but unfortunately I could not find anything.  However, other engineers here may have experience with WMI and C or LabWindows CVI, so I would check this forum again after some time. Ultimately, WMI is Microsoft's product and your best bet is to contact them to find out the correct commands in C.  Their forums may quickly be able to explain the commands you will need.

 

All the best on your project!

Regards,

Shawn S. | NIC
Instrument Driver/IVI PSE
National Instruments
0 Kudos
Message 2 of 8
(3,818 Views)

Well, getting info on a C interface from Microsoft isn't always easy.

 

This would seem to be a general issue for any CVI app that needs to interact with the PC HW, is there some other way to enumerate the installed com ports from a CVI application?

 

Thanks.

 

Menchar

0 Kudos
Message 3 of 8
(3,807 Views)

Hi,

 

I assume you are aware of the code snippet by msaxon given here 

and the possibility to use viFindRsrc ( resource_manager_handle, "ASRL[0-9]*::?*INSTR", &find_handle, &return_count, instrument_descriptor );

 

But somehow I missed why these approaches don't work in yor case?

 

Wolfgang

0 Kudos
Message 4 of 8
(3,802 Views)

We're trying to port some existing VB code that is set up to use WMI - otherwise we wouldn't bother with it.

0 Kudos
Message 5 of 8
(3,799 Views)

And we're looking for a string returned from WMI that identifies a particular port as being a USB to UART bridge (Silicon Labs CP210x), we have code that can retrieve this string from WMI but not any other way that we know of now.

 

 

0 Kudos
Message 6 of 8
(3,789 Views)

Bob,

 

sorry if I am wasting your time, but would it be possible to use VISA with viGetAttribute (,VI_ATTR_MANF_ID,)?

0 Kudos
Message 7 of 8
(3,777 Views)

I'll forward this and see if it works, it's another engineer that has the problem ...

 

Thanks for your interest.

 

Bob

0 Kudos
Message 8 of 8
(3,754 Views)