add Makefile.
[gd/win32-spoolss/.git] / DeletePrinterDriverEx.c
1 /******************************************************************
2  * SPOOLSS regression testing code for Samba print servers
3  *
4  *****************************************************************/
5
6 #include <windows.h>
7 #include <stdio.h>
8 #include <stdlib.h>
9 #include "printlib.h"
10
11 /* we assume the necessary driver files are already uploaded
12    on the server.  We also only exercise The info level 3
13    since that is the one used by the NT Add Printer Wizard */
14 int main (int argc, char* argv[])
15 {
16         LPVOID                  lpMsgBuf;
17
18         if (argc < 3)
19         {
20                 fprintf (stderr, "useage: %s <servername> <arch> <driver name> <version>\n", argv[0]);
21                 exit (-1);
22         }
23
24
25         if (!DeletePrinterDriverEx( argv[1], argv[2], argv[3], DPD_DELETE_SPECIFIC_VERSION|DPD_DELETE_UNUSED_FILES, atoi(argv[4]) ) )
26                 PrintLastError();
27         else
28                 printf ("Printer Driver deleted successfully\n");
29
30         return 0;
31
32 }