setupapi: SetupOpenInfFile returns INVALID_HANDLE_VALUE on failure, not NULL, so fix SetupQueryInfOriginalFileInformation to check for the former rather than the latter.

Robert Shearman rob at codeweavers.com
Thu May 10 08:25:39 CDT 2007


---
  dlls/setupapi/query.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
-------------- next part --------------
diff --git a/dlls/setupapi/query.c b/dlls/setupapi/query.c
index cd50dee..8699264 100644
--- a/dlls/setupapi/query.c
+++ b/dlls/setupapi/query.c
@@ -672,7 +672,7 @@ BOOL WINAPI SetupQueryInfOriginalFileInf
      * 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,


More information about the wine-patches mailing list