From c1dc5f887989544ae22eb4ce48b066f61c8d617e Mon Sep 17 00:00:00 2001 From: Greg Geldorp Date: Mon, 27 Dec 2010 12:35:49 +0100 Subject: [PATCH] spoolss/tests: Skip tests on Win7. --- dlls/spoolss/tests/spoolss.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dlls/spoolss/tests/spoolss.c b/dlls/spoolss/tests/spoolss.c index 6a2711e1752..b7d71d6227f 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;