home *** CD-ROM | disk | FTP | other *** search
- ' **************************************************
- ' *
- ' * VCDAPIGetDrives.vbs
- ' *
- ' * Copyright 2002-2003 by H+H Software GmbH
- ' *
- ' * Virtual CD v5 API example file.
- ' * Read the exisiting virtual drives and devices
- ' * and show them in a dialog box.
- ' *
- ' **************************************************
-
- Option Explicit
-
- DIM IApi ' Virtual CD v5 API Object
- DIM strVCDDrives ' virtual drives
- DIM strTitle ' dialog title
- DIM iDevices ' # of virtual devices
-
- strTitle = "Virtual CD API Example (VCDAPIGetDrives.vbs)"
-
- ' Init the VCD API object
- set IApi = CreateObject("vc5api.api")
-
- ' query the virtual drive letters
- strVCDDrives = IApi.VCDGetVCDDriveLetters()
-
- If Len(strVCDDrives) <> 0 then
- ' query the number of virtual devices
- iDevices = IApi.VCDGetNumberOfVCDDevices()
-
- MsgBox "Currently existing virtual Drives: " & strVCDDrives & vbCrLf & "Currently existing virtual Devices: " & iDevices, vbInformation, strTitle
- Else
- MsgBox "No virtual drives found.", vbExclamation, strTitle
- End If
-
- Set IApi = Nothing
-
- WScript.Quit(0)
-