Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The quest for PHDBase under COM
Message
From
28/03/2000 01:23:09
 
 
To
28/03/2000 00:59:24
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00350619
Message ID:
00351265
Views:
56
>>I assume you've already done something to try playing with SetErrorMode() to see if you can get the critical error not to trap out at the OS?
>
>Unfortunately, I don't know anything about it. Is it an API function?

Yes - it determines whether Windows traps certain errors or passes them along to the app for it to deal with:
SetErrorMode
The SetErrorMode function controls whether the system will handle the specified types of serious errors, or whether the process will handle them.

UINT SetErrorMode(
UINT uMode // process error mode
);
Parameters
uMode
[in] Specifies the process error mode. This parameter can be one or more of the following values.

My guess is if it's going to help, you'll want to pass it the critical error handler flag:

DECLARE INTEGER SetErrorMode IN Kernel32 INTEGER Flags
=SetErrorMode(1)

You can use this to bypass having the OS trap out I/O errors to simplify handling some tests for missing floppies, for example:

DECLARE INTEGER SetErrorMode IN Kernel32 INTEGER Flags
nOldValue=SetErrorMode(0x8001)
? DISKSPACE('A:')
=SetErrorMode(nOldValue)
? DISKSPACE('A:')
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform