Module: wine
Branch: master
Commit: c1dc5f887989544ae22eb4ce48b066f61c8d617e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c1dc5f887989544ae22eb4ce4…
Author: Greg Geldorp <ggeldorp(a)vmware.com>
Date: Mon Dec 27 12:35:49 2010 +0100
spoolss/tests: Skip tests on Win7.
---
dlls/spoolss/tests/spoolss.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/dlls/spoolss/tests/spoolss.c b/dlls/spoolss/tests/spoolss.c
index 6a2711e..b7d71d6 100644
--- a/dlls/spoolss/tests/spoolss.c
+++ b/dlls/spoolss/tests/spoolss.c
@@ -62,6 +62,16 @@ static LPCSTR load_functions(void)
if (!pSplInitializeWinSpoolDrv) return ptr;
+ /* Calling BuildOtherNamesFromMachineName or SplInitializeWinSpoolDrv on
+ * Win7 results in a breakpoint exception. If you continue after hitting
+ * the breakpoint, the functions fail with ERROR_NOT_SUPPORTED. So we
+ * just skip the tests on Win7, since they won't provide any useful info.
+ * To detect Win7, we check whether UnloadDriver exists (it doesn't on
+ * Win7, but does exist on earlier Windows versions) */
+ ptr = "UnloadDriver";
+ if (GetProcAddress(hspl, ptr) == NULL) return ptr;
+
+
ptr = "winspool.drv";
hwinspool = LoadLibraryA(ptr);
if (!hwinspool) return ptr;