From d44dd1005bad8e95ea3c35376488083ebe9261d7 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 1 Mar 2010 20:57:52 +0100 Subject: testprogs: add SetPrinterDataEx test. Guenther --- testprogs/win32/spoolss/spoolss.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/testprogs/win32/spoolss/spoolss.c b/testprogs/win32/spoolss/spoolss.c index 13168f0c12..0ce1603ae8 100644 --- a/testprogs/win32/spoolss/spoolss.c +++ b/testprogs/win32/spoolss/spoolss.c @@ -1290,6 +1290,33 @@ static BOOL test_DeletePrinterKey(struct torture_context *tctx, /**************************************************************************** ****************************************************************************/ +static BOOL test_SetPrinterDataEx(struct torture_context *tctx, + LPSTR servername, + LPSTR keyname, + LPSTR valuename, + HANDLE handle, + DWORD type, + LPBYTE buffer, + DWORD offered) +{ + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, "Testing SetPrinterDataEx(%s - %s)", keyname, valuename); + + err = SetPrinterDataEx(handle, keyname, valuename, type, buffer, offered); + if (err) { + sprintf(tmp, "SetPrinterDataEx(%s) failed on [%s] (buffer size = %d), error: %s\n", + valuename, servername, offered, errstr(err)); + torture_fail(tctx, tmp); + } + + return TRUE; +} + +/**************************************************************************** +****************************************************************************/ + static BOOL test_PrinterData(struct torture_context *tctx, LPSTR servername, HANDLE handle) -- cgit