diff options
author | Günther Deschner <gd@samba.org> | 2010-02-09 15:54:25 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-02-09 16:39:34 +0100 |
commit | dcad5447cf32eba0296bdca07668333004cc50ef (patch) | |
tree | b82bf5d22a7813f82d29b7ea478ff63f87bd45a1 /testprogs | |
parent | 5db64e88c7f8e1e689e0dabc67db1074eb1fef86 (diff) | |
download | samba-dcad5447cf32eba0296bdca07668333004cc50ef.tar.gz samba-dcad5447cf32eba0296bdca07668333004cc50ef.tar.bz2 samba-dcad5447cf32eba0296bdca07668333004cc50ef.zip |
testprogs: print printprocessor info levels in EnumPrintProcessors() spoolss tests.
Guenther
Diffstat (limited to 'testprogs')
-rw-r--r-- | testprogs/win32/spoolss/printlib.c | 31 | ||||
-rw-r--r-- | testprogs/win32/spoolss/spoolss.c | 4 |
2 files changed, 35 insertions, 0 deletions
diff --git a/testprogs/win32/spoolss/printlib.c b/testprogs/win32/spoolss/printlib.c index e696909ed6..a5d2342ce8 100644 --- a/testprogs/win32/spoolss/printlib.c +++ b/testprogs/win32/spoolss/printlib.c @@ -637,6 +637,37 @@ void print_printprocessor_info_1(PPRINTPROCESSOR_INFO_1 info) return; } +void print_printprocessor_info_bylevel(DWORD level, LPBYTE buffer, DWORD count) +{ + DWORD i; + PPRINTPROCESSOR_INFO_1 buffer1 = NULL; + + if (!buffer) { + return; + } + + switch (level) { + case 1: + buffer1 = (PPRINTPROCESSOR_INFO_1)buffer; + break; + default: + break; + } + + printf("Print Processor Info Level %d:\n", level); + + switch (level) { + case 1: + for (i=0; i<count; i++) { + print_printprocessor_info_1(&buffer1[i]); + printf("\n"); + } + break; + default: + break; + } +} + void print_driver_info_1(PDRIVER_INFO_1 info) { printf("\tDriver Name\t= %s\n\n", info->pName); diff --git a/testprogs/win32/spoolss/spoolss.c b/testprogs/win32/spoolss/spoolss.c index 5741e354ef..4e1672e67c 100644 --- a/testprogs/win32/spoolss/spoolss.c +++ b/testprogs/win32/spoolss/spoolss.c @@ -415,6 +415,10 @@ static BOOL test_EnumPrintProcessors(struct torture_context *tctx, } } + if (tctx->print) { + print_printprocessor_info_bylevel(levels[i], buffer, returned); + } + free(buffer); buffer = NULL; } |