delorie.com/djgpp/doc/libc/libc_496.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

_is_cdrom_drive

Syntax

 
#include <dos.h>

int _is_cdrom_drive( const int drive );

Description

This function checks if drive number drive (1 == A:, 2 == B:, etc.) is a CD-ROM drive. It works with MSCDEX 2.x and Windows 9X built-in CDFS support.

Return Value

1 if the drive is a CDROM drive, otherwise 0.

Portability

ANSI/ISO C No
POSIX No

Example

 
#include <stdio.h>
#include <dos.h>

int main(void)
{

  if( _is_cdrom_drive( 'R' - 'A' + 1 ) )
  {
    printf("C: is a CDROM drive.\n");
  }
  else
  {
    printf("C: is not a CDROM drive.\n");
  }

  exit(0);
}


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004