Win: more check on return value