home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 62 / Quick PC 62.iso / Programs / Virtual.CD.v5.0.2.Network.Edition.WinALL / VCD502EG.exe / Program Files / Virtual CD v5 / API / examples / VBS / VCDAPIGetDrives.vbs < prev    next >
Encoding:
Text File  |  2003-02-13  |  1.1 KB  |  40 lines

  1. ' **************************************************
  2. ' *
  3. ' * VCDAPIGetDrives.vbs
  4. ' *
  5. ' * Copyright 2002-2003 by H+H Software GmbH
  6. ' *
  7. ' * Virtual CD v5 API example file. 
  8. ' * Read the exisiting virtual drives and devices
  9. ' * and show them in a dialog box.
  10. ' *
  11. ' **************************************************
  12.  
  13. Option Explicit
  14.  
  15. DIM IApi            ' Virtual CD v5 API Object
  16. DIM strVCDDrives    ' virtual drives
  17. DIM strTitle        ' dialog title
  18. DIM iDevices        ' # of virtual devices
  19.  
  20. strTitle = "Virtual CD API Example (VCDAPIGetDrives.vbs)"
  21.  
  22. ' Init the VCD API object
  23. set IApi = CreateObject("vc5api.api")
  24.  
  25. ' query the virtual drive letters
  26. strVCDDrives = IApi.VCDGetVCDDriveLetters()
  27.  
  28. If Len(strVCDDrives) <> 0 then
  29.     ' query the number of virtual devices
  30.     iDevices = IApi.VCDGetNumberOfVCDDevices()
  31.     
  32.     MsgBox "Currently existing virtual Drives: " & strVCDDrives & vbCrLf & "Currently existing virtual Devices: " & iDevices, vbInformation, strTitle
  33. Else
  34.     MsgBox "No virtual drives found.", vbExclamation, strTitle
  35. End If
  36.  
  37. Set IApi = Nothing
  38.  
  39. WScript.Quit(0)
  40.