DosSysCtl: Difference between revisions
Appearance
Created page with "==Syntax== DosSysCtl(ULONG func, ULONG p); ==Remarks== It is not declared in the headers but it is in the standard import libraries (DOSCALLS.876). Check also Query the D..." |
mNo edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
==Syntax== | ==Syntax== | ||
DosSysCtl(ULONG func, ULONG p); | DosSysCtl(ULONG func, ULONG p); | ||
==Remarks== | ==Remarks== | ||
It is not declared in the headers but it is in the standard import libraries (DOSCALLS.876). | It is not declared in the headers but it is in the standard import libraries (DOSCALLS.876). The DosSysCtl function may be used for detecting whether we're being debugged or not. | ||
Check also [[Query the DosError() state]]. | Check also [[Query the DosError() state]]. | ||
==Sample Code== | ==Sample Code== | ||
<code> | |||
APIRET APIENTRY DosSysCtl(ULONG func, ULONG p); | APIRET APIENTRY DosSysCtl(ULONG func, ULONG p); | ||
Line 13: | Line 15: | ||
DosSysCtl((ULONG)27, (ULONG)&SavedDosError); | DosSysCtl((ULONG)27, (ULONG)&SavedDosError); | ||
DosError(0L); //FERR_DISABLEHARDERROR | DosError(0L); //FERR_DISABLEHARDERROR | ||
... | |||
DosError(SavedDosError); | DosError(SavedDosError); | ||
</code> | |||
[[Category:Dos]] | [[Category:Dos]] |
Latest revision as of 14:01, 30 March 2019
Syntax
DosSysCtl(ULONG func, ULONG p);
Remarks
It is not declared in the headers but it is in the standard import libraries (DOSCALLS.876). The DosSysCtl function may be used for detecting whether we're being debugged or not.
Check also Query the DosError() state.
Sample Code
APIRET APIENTRY DosSysCtl(ULONG func, ULONG p);
ULONG SavedDosError = 1;
DosSysCtl((ULONG)27, (ULONG)&SavedDosError);
DosError(0L); //FERR_DISABLEHARDERROR
...
DosError(SavedDosError);