From c4eeb9f6fae56a6e85b847a03a78ec0e1fde01c3 Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Thu, 10 May 2007 14:25:39 +0100 Subject: [PATCH] setupapi: SetupOpenInfFile returns INVALID_HANDLE_VALUE on failure, not NULL. Fix SetupQueryInfOriginalFileInformation to check for the former rather than the latter. --- dlls/setupapi/query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/setupapi/query.c b/dlls/setupapi/query.c index cd50deee592..86992640626 100644 --- a/dlls/setupapi/query.c +++ b/dlls/setupapi/query.c @@ -672,7 +672,7 @@ BOOL WINAPI SetupQueryInfOriginalFileInformationW( * the original inf file and cache it, but that would require building a * .pnf file. */ hinf = SetupOpenInfFileW(inf_path, NULL, INF_STYLE_WIN4, NULL); - if (!hinf) return FALSE; + if (hinf == INVALID_HANDLE_VALUE) return FALSE; if (!SetupGetLineTextW(NULL, hinf, wszVersion, wszCatalogFile, OriginalFileInfo->OriginalCatalogName,