Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6469979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:03:22+00:00 2026-05-25T06:03:22+00:00

FindFirstFile function is causing There is no disc in the drive. Please insert a

  • 0

FindFirstFile function is causing “There is no disc in the drive. Please insert a disc into drive” Error. The cause of this error is that there is no sd-card in the USB stick and it’s empty. My problem is that I have to scan all the drives for a specific directory and I cannot distinguish whether the drive is empty or not. How can I do this?

I am developing application for Windows and I am using MFC for development.

Any help would be highly appreciated.

Farooq-

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:03:23+00:00Added an answer on May 25, 2026 at 6:03 am

    I’m guessing a little, but I suspect you need to call SetErrorMode() passing the SEM_FAILCRITICALERRORS flag to suppress this dialog appearing. Instead FindFirstFile() will return a failure code and you can move on to the next drive in the enumeration.

    Edit: For Windows 7 and up, consider SetThreadErrorMode() instead. That limits the effect of the mode. Also remember to restore the original mode as soon as possible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've a very simple function that should read a txt file and return all
I use this go get the content of directory foo : FindFirstFile(Lfoo\\*, &findData) .
I am trying to use the FindFirstFile function to traverse through all of my
using C++Builder 2007, the FindFirstFile and FindNextFile functions doesn't seem to be able to
In Windows Mobile I am using FindFirstFile/FindNextFile to search for some files. As part
I'm working on wrapping up the ugly innards of the FindFirstFile / FindNextFile loop
im using WIN32_FIND_DATA to store the data findfirstfile outputs. i want the file location
I want to read all files inside a given folder(path to folder) using FindFirstFile
I have to clean up from a list of files the ones that do
I have some code that deletes some files based on time_t comparisons with the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.