Thread: Avoiding the sys dlg

  1. #1
    Android geek@02's Avatar
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    470

    Avoiding the sys dlg

    Bonjour!

    I'm using the code .....

    Code:
    if(FindFirstFile("a:\\*.*", &fd)!=INVALID_HANDLE_VALUE){
      ....
      ....
    }else{
      cout<<"Please insert disk-1"<<endl;
    }
    .... to check whether the floppy disk is inserted into the drive. But when a disk is not available, system’s "Insert disk" dialog box also executes with my error message. Is there a way to prevent the system's dialog being displayed?

    Merci.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Another problem with your code is that you don't store the handle returned by FindFirstFile which you should call FindClose on.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Factorial
    By foxman in forum Contests Board
    Replies: 27
    Last Post: 07-11-2008, 06:59 PM
  2. passing value from one dlg to another
    By mr_empty in forum Windows Programming
    Replies: 27
    Last Post: 11-29-2007, 04:25 AM
  3. howto add sys call using modules only ?
    By pinkeshzaveri in forum Linux Programming
    Replies: 1
    Last Post: 08-23-2005, 12:28 PM
  4. Memory-Resident programs and Sys files
    By Powerfull Army in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 09-15-2002, 09:13 PM