CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 1999
    Posts
    57

    How to know whether the current drive is CD-ROM or not?




  2. #2
    Join Date
    Apr 1999
    Location
    Toronto, ON
    Posts
    713

    Re: How to know whether the current drive is CD-ROM or not?

    char szDrives[0x200];
    char* lpszDrive=(char*) &szDrives;
    GetLogicalDriveStrings(0x1FF,(char*) &szDrives);//retrieve string with drivenames

    //check type of the drive
    while(*(lpszDrive))
    {
    if (DRIVE_CDROM==(GetDriveType(lpszDrive)))
    {
    //your code
    }
    // next drive
    lpszDrive+=4;
    }

    Dmitriy, MCSE

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

Featured