Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return Codes when using the API to Map Drives
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00142147
Message ID:
00142599
Views:
32
>>Please let me know how it all turns out. The reason that suggested the SetErrorMode function was that it reminded me of "the ugliest white dialog in the world" which you got if you tried to access a floppy without a disk in it in Win 3.1 when the device isn't ready. Using this function was a workaround. As I said, I don't know if it applies here.
>
>
>Hi George,
>
>Sorry to be so pesky, but I have one last (hopefully) question. In the sample code that you suggested (below), I see where I am saving the current SetErrorMode setting (into lnoldmode), but where am I disabling or rerouting it?
>I mainly want to make sure I am understanding correctly what the sample code is doing. (Specifically my goal is to completely disable NT from reporting any errors at all during a certain section of my app)
>
>
>DECLARE INTEGER SetErrorMode IN Win32API;
> INTEGER fuErrorMode
>* 1 = SEM_FAILCRITICALERRORS
>lnoldmode = SetErrorMode(1)

Right here. You set the new mode and the API call returns the old mode.

>* Code here, and when done...
>= SetErrorMode(lnoldmode)
>
>I am assuming that once I save the current mode into a local variable, then I'll need to set it to off, disabled, etc. Run my code, then re-enable it, turn it back on, etc. Does that make sense or am I rambling? (I have been known to ramble with the best of 'em!) :-)
>
>Thanks,
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