Rob Shearman : setupapi: SetupOpenInfFile returns INVALID_HANDLE_VALUE on failure, not NULL.

Alexandre Julliard julliard at wine.codeweavers.com
Fri May 11 07:27:57 CDT 2007


Module: wine
Branch: master
Commit: c4eeb9f6fae56a6e85b847a03a78ec0e1fde01c3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c4eeb9f6fae56a6e85b847a03a78ec0e1fde01c3

Author: Rob Shearman <rob at codeweavers.com>
Date:   Thu May 10 14:25:39 2007 +0100

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 files changed, 1 insertions(+), 1 deletions(-)

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 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,




More information about the wine-cvs mailing list