Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"There is no disk in the drive" in an application that doesn't require it

Tags:

windows

Our application is written in C++ and used on Windows XP. On some client machines with only a C: drive, an error pop ups when the application starts:

There is no disk in the drive. Please insert a disk into drive "D"

If they hit "Continue" or insert a CD (even an empty one!) and press "Try Again", everything works fine.

Someone suggested that this might be related to compiling on drive D: (our build machine uses drive D: for compilation). Has anyone encountered this issue?

like image 254
kshahar Avatar asked Dec 13 '22 06:12

kshahar


1 Answers

It would certainly be a good idea to find out what's trying to access the D drive and fix it. But it's possible to suppress this behaviour, if desired, with a call to SetErrorMode using the SEM_FAILCRITICALERRORS flag. It may even help you to identify the problem, because the error will be sent directly to the application instead of being handled with a system dialog.

like image 196
Stu Mackellar Avatar answered Apr 29 '23 09:04

Stu Mackellar