1 /******************************************************************
2 * SPOOLSS regression testing code for Samba print servers
4 *****************************************************************/
11 int main (int argc, char* argv[])
22 fprintf (stderr, "useage: %s <servername> <value name>\n", argv[0]);
27 if (!OpenPrinter (argv[1], &server, NULL))
30 printf ("Server [%s] opened successfully.\n\n", argv[1]);
32 status=GetPrinterDataEx(server, "PrinterDriverData", argv[2], &type, pData, 0, &pcbData);
33 if ((status != ERROR_SUCCESS) && (status != ERROR_MORE_DATA))
39 if ((pData = (LPBYTE)malloc(pcbData)) == NULL)
41 fprintf (stderr, "Unable to malloc memory for Value Data!\n");
45 status = GetPrinterDataEx(server, "PrinterDriverData", argv[2], &type, pData, pcbData, &pcbData);
46 if (status == ERROR_SUCCESS)
48 printf ("\tValue Name = %s\n", argv[2]);
49 printf ("\tType = %d\n", type);
50 printf ("\tData = 0x%x bytes\n", pcbData);
54 printf ("\t0x%x", *(pData++));
66 /* close the server */
67 if (!ClosePrinter(server))
70 printf ("Server [%s] closed successfully.\n", argv[1]);