Click here to Skip to main content
15,902,635 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Use of class function in thread Pin
Joaquín M López Muñoz16-Apr-03 8:35
Joaquín M López Muñoz16-Apr-03 8:35 
GeneralRe: Use of class function in thread Pin
jason9916-Apr-03 12:53
jason9916-Apr-03 12:53 
GeneralRe: Use of class function in thread Pin
Tomaz Rotovnik16-Apr-03 23:24
Tomaz Rotovnik16-Apr-03 23:24 
GeneralCRichEditView drag and drop.. Pin
RobJones16-Apr-03 4:34
RobJones16-Apr-03 4:34 
GeneralRe: CRichEditView drag and drop.. Pin
G. Steudtel17-Apr-03 4:23
G. Steudtel17-Apr-03 4:23 
GeneralCD-ROM Status Pin
pmask16-Apr-03 3:41
pmask16-Apr-03 3:41 
GeneralRe: CD-ROM Status Pin
David Crow16-Apr-03 4:11
David Crow16-Apr-03 4:11 
GeneralRe: CD-ROM Status Pin
Joaquín M López Muñoz16-Apr-03 4:20
Joaquín M López Muñoz16-Apr-03 4:20 
An alternative to DavidCrow's method:
#include <windows.h>
#include <sys/types.h>
#include <sys/stat.h>
 
bool drive_present(const char letter)
{
  char nul_file[]="#:\\NUL";
  nul_file[0]=letter;
 
  DWORD error_mode=::SetErrorMode(0);
  ::SetErrorMode(error_mode|SEM_FAILCRITICALERRORS);
 
  struct _stat st;
  int res=_stat(nul_file,&st)==0;
 
  ::SetErrorMode(error_mode);
    
  return res!=0;
}
Use drive_present with the drive letter of the CD.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
QuestionHow to make an installer package Pin
gumber16-Apr-03 2:35
gumber16-Apr-03 2:35 
AnswerRe: How to make an installer package Pin
Jim Crafton16-Apr-03 3:15
Jim Crafton16-Apr-03 3:15 
AnswerRe: How to make an installer package Pin
Chris Richardson16-Apr-03 6:34
Chris Richardson16-Apr-03 6:34 
AnswerRe: How to make an installer package Pin
Ravi Bhavnani16-Apr-03 6:36
professionalRavi Bhavnani16-Apr-03 6:36 
GeneralRe: How to make an installer package Pin
Martin_Viet16-Apr-03 8:26
Martin_Viet16-Apr-03 8:26 
GeneralTermination of a thread Pin
Vassili16-Apr-03 2:11
Vassili16-Apr-03 2:11 
GeneralRe: Termination of a thread Pin
David Crow16-Apr-03 2:16
David Crow16-Apr-03 2:16 
GeneralRe: Termination of a thread Pin
Vassili16-Apr-03 3:27
Vassili16-Apr-03 3:27 
GeneralRe: Termination of a thread Pin
David Crow16-Apr-03 3:33
David Crow16-Apr-03 3:33 
GeneralRe: Termination of a thread Pin
Vassili16-Apr-03 4:24
Vassili16-Apr-03 4:24 
GeneralRe: Termination of a thread Pin
David Crow16-Apr-03 4:31
David Crow16-Apr-03 4:31 
GeneralRe: Termination of a thread Pin
Rage16-Apr-03 4:52
professionalRage16-Apr-03 4:52 
GeneralRe: Termination of a thread Pin
Mike Upton16-Apr-03 2:26
Mike Upton16-Apr-03 2:26 
QuestionHow to describe such objects using C++? Pin
George216-Apr-03 1:30
George216-Apr-03 1:30 
AnswerRe: How to describe such objects using C++? Pin
perlmunger16-Apr-03 7:10
perlmunger16-Apr-03 7:10 
GeneralXOR mode Pin
pankajdaga16-Apr-03 1:21
pankajdaga16-Apr-03 1:21 
GeneralRe: XOR mode Pin
Dominik Reichl16-Apr-03 1:58
Dominik Reichl16-Apr-03 1:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.