DosShutdown (OS/2 1.x): Difference between revisions
No edit summary |
|||
Line 12: | Line 12: | ||
==Return Code== | ==Return Code== | ||
;rc (USHORT) - return:Return code description is: | |||
Return code description is: | ::0 NO_ERROR | ||
::274 ERROR_ALREADY_SHUTDOWN | |||
::87 ERROR_INVALID_PARAMETER | |||
==Remarks== | ==Remarks== |
Revision as of 22:14, 7 November 2017
![]() | |
---|---|
It is recommended to use a newer replacement for this function. | |
Replacement: | DosShutdown |
Remarks: | This page list the older version of the function for reference. |
This call locks out changes to all file systems and forces system buffers to disk in preparation for system power off.
Syntax
DosShutdown (Reserved)
Parameters
- Reserved (ULONG) - input
- Double-word whose value must be zero.
Return Code
- rc (USHORT) - return
- Return code description is:
- 0 NO_ERROR
- 274 ERROR_ALREADY_SHUTDOWN
- 87 ERROR_INVALID_PARAMETER
Remarks
DosShutdown may take several minutes to complete depending on the amount of data buffered.
Other API function calls that change file system data called while the system is shutdown will either return the error ERROR_ALREADY_SHUTDOWN or block permanently.
It should be noted that it will not be possible to increase memory overcommit once the DosShutdown has been called. This means that in low memory situations some functions may fail due to a lack of memory. This is of particular importance to the process calling DosShutdown. All memory that the calling process will ever need should be allocated before calling DosShutdown. This includes implicit memory allocation that may be done on behalf of the caller by system functions.
When DosShutdown returns successfully, it is safe to power the system off or to reboot it.
C Binding
#define INCL_DOSFILEMGR USHORT rc = DosShutdown(Reserved); ULONG Reserved; /* Reserved, must be set to zero */ USHORT rc; /* return code */
MASM Binding
EXTRN DosShutdown:FAR INCL_DOSFILEMGR EQU 1 PUSH DWORD Reserved ;Reserved, must be set to zero CALL DosShutdown Returns WORD