Jacek Caban : atl:
Compare file handle to INVALID_HANDLE_VALUE to handle errors.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Mar 7 07:16:41 CST 2007
Module: wine
Branch: master
Commit: ecac3c1c064ce16fe6a69564d24d7d15e67e2051
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ecac3c1c064ce16fe6a69564d24d7d15e67e2051
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Mar 7 00:05:15 2007 +0100
atl: Compare file handle to INVALID_HANDLE_VALUE to handle errors.
---
dlls/atl/registrar.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/atl/registrar.c b/dlls/atl/registrar.c
index 6fa2fbd..353e113 100644
--- a/dlls/atl/registrar.c
+++ b/dlls/atl/registrar.c
@@ -479,7 +479,7 @@ static HRESULT file_register(Registrar *This, LPCOLESTR fileName, BOOL do_regist
HRESULT hres;
file = CreateFileW(fileName, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL);
- if(file) {
+ if(file != INVALID_HANDLE_VALUE) {
filelen = GetFileSize(file, NULL);
regstra = HeapAlloc(GetProcessHeap(), 0, filelen);
lres = ReadFile(file, regstra, filelen, NULL, NULL);
More information about the wine-cvs
mailing list