Im writing a program in VB.Net that calls another command line program that mounts CD images into a virtual CD (D-Tools Daemon). My program then uses the mounted image like a regular CD.
The problem is that Daemon returns from the command line before it is actually done mounting the CD. It takes about 5-10 seconds. And in the next few lines of code when I go to read from the mounted image I get a System.IO.IOException saying that the drive is not ready.
How can I check to see if the image is mounted before proceeding to read from it?
Im hoping there is some nice clean event-oriented way (AddHandler?) of doing this. Im still pretty new to VB.Net so a short example would be helpful.
The problem is that Daemon returns from the command line before it is actually done mounting the CD. It takes about 5-10 seconds. And in the next few lines of code when I go to read from the mounted image I get a System.IO.IOException saying that the drive is not ready.
How can I check to see if the image is mounted before proceeding to read from it?
Im hoping there is some nice clean event-oriented way (AddHandler?) of doing this. Im still pretty new to VB.Net so a short example would be helpful.