Hello,
before Christmas i did some check on an NT4 system at work that leads to the attached tests. But currently i am not at work and have no windows system available.
Can someone please build and run the attached tests on a windows system (NT4 prefered) and report the results.
Thanks Stefan
Index: configure.ac =================================================================== RCS file: /home/wine/wine/configure.ac,v retrieving revision 1.116 diff -u -r1.116 configure.ac --- configure.ac 4 Jan 2003 02:52:05 -0000 1.116 +++ configure.ac 5 Jan 2003 16:05:33 -0000 @@ -1472,6 +1472,7 @@ dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile +dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile Index: dlls/winspool/Makefile.in =================================================================== RCS file: /home/wine/wine/dlls/winspool/Makefile.in,v retrieving revision 1.22 diff -u -r1.22 Makefile.in --- dlls/winspool/Makefile.in 12 Nov 2002 02:22:24 -0000 1.22 +++ dlls/winspool/Makefile.in 5 Jan 2003 16:07:17 -0000 @@ -13,6 +13,8 @@ info.c \ wspool.c
+SUBDIRS = tests + @MAKE_DLL_RULES@
### Dependencies: --- /dev/null Mon Sep 24 03:54:15 2001 +++ dlls/winspool/tests/Makefile.in Sun Jan 5 16:56:25 2003 @@ -0,0 +1,13 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +TESTDLL = winspool.drv +IMPORTS = winspool kernel32 ntdll + +CTESTS = \ + info.c + +@MAKE_TEST_RULES@ + +### Dependencies: --- /dev/null Mon Sep 24 03:54:15 2001 +++ dlls/winspool/tests/info.c Sun Jan 5 18:45:34 2003 @@ -0,0 +1,57 @@ +#include "wine/test.h" +#include "winbase.h" +#include "winerror.h" +#include "winspool.h" + +static void test_printer_directory(ivoid) +{ LPBYTE buffer = NULL; + DWORD cbBuf, pcbNeeded; + BOOL res; + + (void) GetPrinterDriverDirectoryA( NULL, NULL, 1, NULL, 0, &cbBuf); + + buffer = HeapAlloc( GetProcessHeap(), 0, cbBuf*2); + + res = GetPrinterDriverDirectoryA(NULL, NULL, 1, buffer, cbBuf, &pcbNeeded); + ok( res, "expected result != 0, got %d", res); + ok( cbBuf == pcbNeeded, "pcbNeeded set to %ld instead of %ld", + pcbNeeded, cbBuf); + + res = GetPrinterDriverDirectoryA(NULL, NULL, 1, buffer, cbBuf*2, &pcbNeeded); + ok( res, "expected result != 0, got %d", res); + ok( cbBuf == pcbNeeded, "pcbNeeded set to %ld instead of %ld", + pcbNeeded, cbBuf); + + res = GetPrinterDriverDirectoryA( NULL, NULL, 1, buffer, cbBuf-1, &pcbNeeded); + ok( !res , "expected result == 0, got %d", res); + ok( cbBuf == pcbNeeded, "pcbNeeded set to %ld instead of %ld", + pcbNeeded, cbBuf); + ok( ERROR_INSUFFICIENT_BUFFER == GetLastError(), + "last error set to %ld instead of ERROR_INSUFFICIENT_BUFFER", + GetLastError()); + + res = GetPrinterDriverDirectoryA( NULL, NULL, 1, NULL, cbBuf, &pcbNeeded); + ok( !res , "expected result == 0, got %d", res); + ok( ERROR_INVALID_USER_BUFFER == GetLastError(), + "last error set to %ld instead of ERROR_INVALID_USER_BUFFER", + GetLastError()); + + res = GetPrinterDriverDirectoryA( NULL, NULL, 1, buffer, cbBuf, NULL); + ok( !res , "expected result == 0, got %d", res); + ok( RPC_X_NULL_REF_POINTER == GetLastError(), + "last error set to %ld instead of RPC_X_NULL_REF_POINTER", + GetLastError()); + + res = GetPrinterDriverDirectoryA( NULL, NULL, 1, NULL, cbBuf, NULL); + ok( !res , "expected result == 0, got %d", res); + ok( RPC_X_NULL_REF_POINTER == GetLastError(), + "last error set to %ld instead of RPC_X_NULL_REF_POINTER", + GetLastError()); + + HeapFree( GetProcessHeap(), 0, buffer); +} + +START_TEST(info) +{ + test_printer_directory(); +}
Hi,
On Sun, 5 Jan 2003, Stefan Leichter wrote:
Hello,
before Christmas i did some check on an NT4 system at work that leads to the attached tests. But currently i am not at work and have no windows system available.
Can someone please build and run the attached tests on a windows system (NT4 prefered) and report the results.
It works on NT4. However I get the following failures on Win95 so it still needs some work:
info.c:35: Test failed: expected result == 0, got 1 info.c:36: Test failed: last error set to 87 instead of ERROR_INVALID_USER_BUFFER info.c:41: Test failed: expected result == 0, got 1 info.c:42: Test failed: last error set to 0 instead of RPC_X_NULL_REF_POINTER info.c:47: Test failed: expected result == 0, got 1 info.c:48: Test failed: last error set to 87 instead of RPC_X_NULL_REF_POINTER
Also, to compile it on Windows you have to include wingdi.h before including winspool.h. I'm checking out why this isn't necessary in Wine. (and msvcmaker needs a trivial fix which I'll post shortly)
Am Sonntag 05 Januar 2003 23:19 schrieb Francois Gouget:
It works on NT4. However I get the following failures on Win95 so it still needs some work:
info.c:35: Test failed: expected result == 0, got 1 info.c:36: Test failed: last error set to 87 instead of ERROR_INVALID_USER_BUFFER info.c:41: Test failed: expected result == 0, got 1 info.c:42: Test failed: last error set to 0 instead of RPC_X_NULL_REF_POINTER info.c:47: Test failed: expected result == 0, got 1 info.c:48: Test failed: last error set to 87 instead of RPC_X_NULL_REF_POINTER
Also, to compile it on Windows you have to include wingdi.h before including winspool.h. I'm checking out why this isn't necessary in Wine. (and msvcmaker needs a trivial fix which I'll post shortly)
Hello Francois,
many thanks for your help. I will fix the tests for win95. i hope win98 and winme will will behave like win95.
Best regards Stefan