Paul Vriens : setupapi/tests: SetupQueryInfOriginalFileInformationA is not available on win98.

Alexandre Julliard julliard at wine.codeweavers.com
Tue May 8 13:17:02 CDT 2007


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

Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date:   Tue May  8 19:19:45 2007 +0200

setupapi/tests: SetupQueryInfOriginalFileInformationA is not available on win98.

---

 dlls/setupapi/tests/misc.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/dlls/setupapi/tests/misc.c b/dlls/setupapi/tests/misc.c
index 84b1ce1..1c193e1 100644
--- a/dlls/setupapi/tests/misc.c
+++ b/dlls/setupapi/tests/misc.c
@@ -44,7 +44,7 @@ static CHAR CURR_DIR[MAX_PATH];
 
 static BOOL (WINAPI *pSetupGetFileCompressionInfoExA)(PCSTR, PSTR, DWORD, PDWORD, PDWORD, PDWORD, PUINT);
 static BOOL (WINAPI *pSetupCopyOEMInfA)(PCSTR, PCSTR, DWORD, DWORD, PSTR, DWORD, PDWORD, PSTR *);
-
+static BOOL (WINAPI *pSetupQueryInfOriginalFileInformationA)(PSP_INF_INFORMATION, UINT, PSP_ALTPLATFORM_INFO, PSP_ORIGINAL_FILE_INFO_A);
 
 static void append_str(char **str, const char *data)
 {
@@ -111,6 +111,12 @@ static void test_original_file_name(LPCSTR original, LPCSTR dest)
     BOOL res;
     DWORD size;
 
+    if (!pSetupQueryInfOriginalFileInformationA)
+    {
+        skip("SetupQueryInfOriginalFileInformationA is not available\n");
+        return;
+    }
+
     hinf = SetupOpenInfFileA(dest, NULL, INF_STYLE_WIN4, NULL);
     ok(hinf != NULL, "SetupOpenInfFileA failed with error %d\n", GetLastError());
 
@@ -123,12 +129,12 @@ static void test_original_file_name(LPCSTR original, LPCSTR dest)
     ok(res, "SetupGetInfInformation failed with error %d\n", GetLastError());
 
     spofi.cbSize = 0;
-    res = SetupQueryInfOriginalFileInformationA(pspii, 0, NULL, &spofi);
+    res = pSetupQueryInfOriginalFileInformationA(pspii, 0, NULL, &spofi);
     ok(!res && GetLastError() == ERROR_INVALID_USER_BUFFER,
         "SetupQueryInfOriginalFileInformationA should have failed with ERROR_INVALID_USER_BUFFER instead of %d\n", GetLastError());
 
     spofi.cbSize = sizeof(spofi);
-    res = SetupQueryInfOriginalFileInformationA(pspii, 0, NULL, &spofi);
+    res = pSetupQueryInfOriginalFileInformationA(pspii, 0, NULL, &spofi);
     ok(res, "SetupQueryInfOriginalFileInformationA failed with error %d\n", GetLastError());
     ok(!spofi.OriginalCatalogName[0], "spofi.OriginalCatalogName should have been \"\" instead of \"%s\"\n", spofi.OriginalCatalogName);
     todo_wine
@@ -568,6 +574,7 @@ START_TEST(misc)
 
     pSetupGetFileCompressionInfoExA = (void*)GetProcAddress(hsetupapi, "SetupGetFileCompressionInfoExA");
     pSetupCopyOEMInfA = (void*)GetProcAddress(hsetupapi, "SetupCopyOEMInfA");
+    pSetupQueryInfOriginalFileInformationA = (void*)GetProcAddress(hsetupapi, "SetupQueryInfOriginalFileInformationA");
 
     GetCurrentDirectoryA(MAX_PATH, CURR_DIR);
 




More information about the wine-cvs mailing list