Jump to content

DosSysCtl: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
{{Legacy
|RepFunc=
|Remarks=This page list the older version of the function for reference.
}}


==Syntax==
==Syntax==
Line 8: Line 4:


==Remarks==
==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.  
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 18: 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);