Jump to content

Query the DosError() state: Difference between revisions

From NikiWiki
No edit summary
 
Martini (talk | contribs)
No edit summary
 
Line 1: Line 1:
Found in comp.os.os2.programmer.misc:
Moved to [http://www.edm2.com/index.php/Query_the_DosError()_state]


-------------------------------------
SEG:
>>The reason is that there is no way to undo DosError(), since there is
>> no way to query what is the state of error-reporting was when your
>> function is called.
Umm, not well-documented, but a little poking revealed this (won't work in
Warp 3 or Warp 4 prior to FP13):
APIRET APIENTRY DosSysCtl(ULONG func, ULONG p);
        ULONG SavedDosError = 1;
        DosSysCtl((ULONG)27, (ULONG)&SavedDosError);
        DosError(0L);    //FERR_DISABLEHARDERROR
...
        DosError(SavedDosError);
Hope this helps.


---------------------------------------
[[Category:Redirects]]

Latest revision as of 17:34, 18 July 2017

Moved to [1]