[PATCH 7/8] urlmon/tests: CopyStgMedium not present on W95B

Detlef Riekenberg wine.dev at web.de
Thu Apr 15 17:20:28 CDT 2010


---
 dlls/urlmon/tests/misc.c |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/dlls/urlmon/tests/misc.c b/dlls/urlmon/tests/misc.c
index c9f9cf3..daa6389 100644
--- a/dlls/urlmon/tests/misc.c
+++ b/dlls/urlmon/tests/misc.c
@@ -68,6 +68,7 @@ static HRESULT (WINAPI *pCoInternetGetSecurityUrl)(LPCWSTR, LPWSTR*, PSUACTION,
 static HRESULT (WINAPI *pCoInternetGetSession)(DWORD, IInternetSession **, DWORD);
 static HRESULT (WINAPI *pCoInternetParseUrl)(LPCWSTR, PARSEACTION, DWORD, LPWSTR, DWORD, DWORD *, DWORD);
 static HRESULT (WINAPI *pCoInternetQueryInfo)(LPCWSTR, QUERYOPTION, DWORD, LPVOID, DWORD, DWORD *, DWORD);
+static HRESULT (WINAPI *pCopyStgMedium)(const STGMEDIUM *, STGMEDIUM *);
 
 static void test_CreateFormatEnum(void)
 {
@@ -414,7 +415,6 @@ static void test_CoInternetQueryInfo(void)
         return;
     }
 
-
     for(i=0; i < sizeof(query_info_tests)/sizeof(query_info_tests[0]); i++) {
         cb = 0xdeadbeef;
         memset(buf, '?', sizeof(buf));
@@ -1175,12 +1175,18 @@ static void test_CopyStgMedium(void)
 
     static WCHAR fileW[] = {'f','i','l','e',0};
 
+    if (!pCopyStgMedium) {
+        win_skip("CopyStgMedium not found\n");
+        return;
+    }
+
+
     memset(&src, 0xf0, sizeof(src));
     memset(&dst, 0xe0, sizeof(dst));
     memset(&empty, 0xf0, sizeof(empty));
     src.tymed = TYMED_NULL;
     src.pUnkForRelease = NULL;
-    hres = CopyStgMedium(&src, &dst);
+    hres = pCopyStgMedium(&src, &dst);
     ok(hres == S_OK, "CopyStgMedium failed: %08x\n", hres);
     ok(dst.tymed == TYMED_NULL, "tymed=%d\n", dst.tymed);
     ok(dst.u.hGlobal == empty, "u=%p\n", dst.u.hGlobal);
@@ -1190,7 +1196,7 @@ static void test_CopyStgMedium(void)
     src.tymed = TYMED_ISTREAM;
     src.u.pstm = NULL;
     src.pUnkForRelease = NULL;
-    hres = CopyStgMedium(&src, &dst);
+    hres = pCopyStgMedium(&src, &dst);
     ok(hres == S_OK, "CopyStgMedium failed: %08x\n", hres);
     ok(dst.tymed == TYMED_ISTREAM, "tymed=%d\n", dst.tymed);
     ok(!dst.u.pstm, "pstm=%p\n", dst.u.pstm);
@@ -1200,16 +1206,16 @@ static void test_CopyStgMedium(void)
     src.tymed = TYMED_FILE;
     src.u.lpszFileName = fileW;
     src.pUnkForRelease = NULL;
-    hres = CopyStgMedium(&src, &dst);
+    hres = pCopyStgMedium(&src, &dst);
     ok(hres == S_OK, "CopyStgMedium failed: %08x\n", hres);
     ok(dst.tymed == TYMED_FILE, "tymed=%d\n", dst.tymed);
     ok(dst.u.lpszFileName && dst.u.lpszFileName != fileW, "lpszFileName=%p\n", dst.u.lpszFileName);
     ok(!lstrcmpW(dst.u.lpszFileName, fileW), "wrong file name\n");
     ok(!dst.pUnkForRelease, "pUnkForRelease=%p, expected NULL\n", dst.pUnkForRelease);
 
-    hres = CopyStgMedium(&src, NULL);
+    hres = pCopyStgMedium(&src, NULL);
     ok(hres == E_POINTER, "CopyStgMedium failed: %08x, expected E_POINTER\n", hres);
-    hres = CopyStgMedium(NULL, &dst);
+    hres = pCopyStgMedium(NULL, &dst);
     ok(hres == E_POINTER, "CopyStgMedium failed: %08x, expected E_POINTER\n", hres);
 }
 
@@ -1451,6 +1457,7 @@ START_TEST(misc)
     pCoInternetGetSession = (void*) GetProcAddress(hurlmon, "CoInternetGetSession");
     pCoInternetParseUrl = (void*) GetProcAddress(hurlmon, "CoInternetParseUrl");
     pCoInternetQueryInfo = (void*) GetProcAddress(hurlmon, "CoInternetQueryInfo");
+    pCopyStgMedium = (void*) GetProcAddress(hurlmon, "CopyStgMedium");
 
     register_protocols();
 
-- 
1.7.0.4




More information about the wine-patches mailing list