summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
Diffstat (limited to 'testprogs')
-rw-r--r--testprogs/win32/spoolss/printlib.c41
-rw-r--r--testprogs/win32/spoolss/spoolss.c4
2 files changed, 45 insertions, 0 deletions
diff --git a/testprogs/win32/spoolss/printlib.c b/testprogs/win32/spoolss/printlib.c
index 0790144db1..e696909ed6 100644
--- a/testprogs/win32/spoolss/printlib.c
+++ b/testprogs/win32/spoolss/printlib.c
@@ -264,6 +264,47 @@ void print_monitor_info_2(PMONITOR_INFO_2 info)
return;
}
+void print_monitor_info_bylevel(DWORD level, LPBYTE buffer, DWORD count)
+{
+ DWORD i;
+ PMONITOR_INFO_1 buffer1 = NULL;
+ PMONITOR_INFO_2 buffer2 = NULL;
+
+ if (!buffer) {
+ return;
+ }
+
+ switch (level) {
+ case 1:
+ buffer1 = (PMONITOR_INFO_1)buffer;
+ break;
+ case 2:
+ buffer2 = (PMONITOR_INFO_2)buffer;
+ break;
+ default:
+ break;
+ }
+
+ printf("Monitor Info Level %d:\n", level);
+
+ switch (level) {
+ case 1:
+ for (i=0; i<count; i++) {
+ print_monitor_info_1(&buffer1[i]);
+ printf("\n");
+ }
+ break;
+ case 2:
+ for (i=0; i<count; i++) {
+ print_monitor_info_2(&buffer2[i]);
+ printf("\n");
+ }
+ break;
+ default:
+ break;
+ }
+}
+
void print_port_info_1(PPORT_INFO_1 info)
{
printf("\tPort Name\t= %s\n", info->pName);
diff --git a/testprogs/win32/spoolss/spoolss.c b/testprogs/win32/spoolss/spoolss.c
index 90cdc816cd..5741e354ef 100644
--- a/testprogs/win32/spoolss/spoolss.c
+++ b/testprogs/win32/spoolss/spoolss.c
@@ -363,6 +363,10 @@ static BOOL test_EnumMonitors(struct torture_context *tctx,
}
}
+ if (tctx->print) {
+ print_monitor_info_bylevel(levels[i], buffer, returned);
+ }
+
free(buffer);
buffer = NULL;
}