Some API calls return a single failure/success flag, without any additional information (e.g. GetObject):
if ( GetObjectW( obj, 0, NULL ) == 0 ) { // Failure: no additional information available. }