PREfast Warning 381 (Windows CE 5.0)
381 - Shutdown API <function> used with dwReason equal to zero (other) and no lpMessage specified, or with an invalid dwReason.
This warning indicates that InitatiateSystemShutdownEx has been used with any of the following parameters:
- dwReason = 0 and lpMessage = NULL
- lpMessage = "\0"
- dwReason >= 0xd0000000.
Example
Defective Source
bRet = InitiateSystemShutdownEx(NULL, // computer name
"", // message to display (none)
0, // length of time to display
FALSE, // force closed option
TRUE, // restart option
0); // shutdown reason (other)
Corrected Source
bRet = InitiateSystemShutdownEx(NULL, // computer name
"Restart needed because...",
// include message to display
0, // length of time to display
FALSE, // force closed option
TRUE, // restart option
0); // shutdown reason (other)
Send Feedback on this topic to the authors