mirror of
https://github.com/reactos/wine.git
synced 2025-01-31 17:23:53 +00:00
atl: Compare file handle to INVALID_HANDLE_VALUE to handle errors.
This commit is contained in:
parent
26344ce3f2
commit
ecac3c1c06
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user