LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to tell if a CD is present in the drive

Using CVI 6.0, how can I tell if a particular cd is installed in the cd-drive? It needs to work on any Windows OS.

 

Thanks for your help.

0 Kudos
Message 1 of 3
(3,297 Views)

Oh, well... a little bit rude, absolutely not polite, maybe not professional but...

Why not issuing a "dir" command, redirecting output to a file and scanning the file afterwards? It surely will work on any system and with any CVI version and will not imply any painful digging into Windows API command or so...



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(3,288 Views)

How about using GetFirstFile function?

If you get 0 return value then disc is present otherwise not.

It won't tell you if empty disc is there. 

Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 3 of 3
(3,249 Views)