Results 1 to 10 of 10

Thread: Check for disk in CD/DVD drive

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2006
    Posts
    18

    Check for disk in CD/DVD drive

    How do I check to see if there is a CD or DVD in a specified drive in vb.net.

    This is how i did it in VB Classic:

    VB Code:
    1. Public Function CheckDrive() As Boolean
    2.         Dim lngTotalClusters As Long
    3.         CheckDrive = True
    4.         If (GetDiskFreeSpace(drivePath & ":\", 0&, 0&, 0&, lngTotalClusters) = 0) Then
    5.             CheckDrive = False
    6.         End If
    7.     End Function

    ...but this doesnt seem to work
    Last edited by hobbes487; Mar 30th, 2006 at 07:38 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width