tags:

views:

480

answers:

4

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?

+2  A: 

Try compiling it on C: and see if the error still exists. You can use Process Monitor from www.syinternals.com to see which file/dir the program is trying to access. Hope this helps!

Treb
A: 

Oh yes, we used to have errors like these ... unfortunately i can't tell you what the fix was but it was something utterly stupid, that much i remember. I could still find the comment in our CDebugStackWalk class, so it may have to do with stack unrolling ... somewhere, somehow...

steffenj
+1  A: 

Try running the program through Dependency Walker, and see if there's any reference to D: in the binary's dependencies. This might give you a hint to which library (if any) is being problematic. Or it might give you nothing, but it's free and very quick to do, so I'd recommend it.

unwind
+2  A: 

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.

Stu Mackellar