This call locks out changes to all file systems and forces system buffers to disk in preparation for system power off.
DosShutdown
Reserved (ULONG) - input
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.