Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
329 - Return value for a call to <function> should not be checked against <number>.
CreateFile returns INVALID_HANDLE_VALUE when the operation fails.
Example
Defective Source
if (CreateFile() == NULL)
{
return;
}
Corrected Source
if (CreateFile() == INVALID_HANDLE_VALUE)
{
return;
}
Send Feedback on this topic to the authors