mlegge
May 24th, 2001, 11:08 AM
I have posted this to the VC++ forum as well. I am hoping maybe someone in one of these two groups can help me.
We have a service which runs in Auto mode under Win NT 4.0. One section of our code must try to access a file on a floppy. If it can't find it, it tries on the hard drive. No problem, except we get the system error dialog if there is no disk in the floppy drive.
We use ::SetErrorMode(SEM_FAILCRITICALERRORS) before we try to access the drive and we reset the error mode to the previous mode when we are finished. This works fine if our service is in manual mode, ie, we start it from the SCM ourselves.
However, if we change the service to start automacially on computer startup, the SetError mode does not suppress the system dialog box.
Any ideas?
Thanks
Mel
We have a service which runs in Auto mode under Win NT 4.0. One section of our code must try to access a file on a floppy. If it can't find it, it tries on the hard drive. No problem, except we get the system error dialog if there is no disk in the floppy drive.
We use ::SetErrorMode(SEM_FAILCRITICALERRORS) before we try to access the drive and we reset the error mode to the previous mode when we are finished. This works fine if our service is in manual mode, ie, we start it from the SCM ourselves.
However, if we change the service to start automacially on computer startup, the SetError mode does not suppress the system dialog box.
Any ideas?
Thanks
Mel