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:
00142594
Views:
36
>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)
* 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,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform