I. INTRODUCTION
Virtual optical drive, for all of us, will not be too unfamiliar. For a variety of reasons, such as, some games, need to be in the optical drive to run, we in order to protect the optical drive, or to speed up the game to read the speed of the disc, or because some computers have not installed optical drive (Internet cafes, school computers are often the case). We can use the virtual optical drive to achieve our goal. Jinshan Virtual Optical drive is a more extensive application of a virtual optical drive software. It is simple to install and is also handy for making virtual discs.
However, in the process of using it, I found that each time in order to insert the virtual disc into the optical drive or eject the CD from the virtual CD-ROM, we need to run the Kingsoft Virtual Optical Drive management tool before we can do it. Although not very complicated, but each time to do this is also feel more annoying, we are all have hands-on ability, why not self-reliance, DIY one? Hardware DIY may not be very conditional on many people, but the DIY software, for us to have a certain degree of programming ability of people is completely feasible. In particular, we can learn a lot from this kind of DIY.
1. Feature Preview
Before we start DIY, let's look at the final effect. When you right-click on the letter in the virtual CD-ROM to eject its contextual menu, you will find that it will have one or two more menus, as shown in the following figure:
Click the new Insert Virtual disc file (I) ... menu to open the File Browsing dialog box. You select a virtual disc file from (usually *. ISO), the virtual disc is immediately inserted into the disc. When there is a disc in the virtual CD drive, the "Eject virtual disc File" menu item will appear in the menu, obviously. When you select the menu directive, the disc in the virtual CD-ROM will immediately eject.
When you right-click a virtual disc file from within the browser (*. ISO), a submenu appears in its context menu, as shown in the following figure:
Insert Virtual CD-ROM This submenu lists all the virtual drive letter characters in the current system. function is also obvious, when you select one of these, the virtual disc is inserted into the virtual CD-ROM you choose.
This is not more than the use of Kingsoft Virtual CD-ROM with the management software handy, at least it does not have to start a software to carry out.
2. Working principle
So, how does it work? In Windows systems, browsers (explorer) provide a plug-in mechanism for Third-party applications: Shell extensions. Shell extensions work in the form of COM, which has many kinds. That's one of the things we use here: Context menu extensions.
3. Related knowledge
Here's a brief introduction to some of the knowledge you need to write this program, some of which have been mentioned, such as shell extensions, COM technologies. This article was written with vc++6.0 and used in the ATL library. There is a need for these readers to have some understanding, which will help to understand the procedure in this article. Of course, even if you do not understand, it does not matter, you can still read this article to successfully DIY one time.