module spool

struct BUFFER5 {
       uint32 buf_len;
       uint16 buffer[buf_len];
};

struct BUFFERP {
       uint32 buf_len;
       BUFFER5 *buf;
};

struct UNISTR2 {
       uint32 max_len;
       uint32 undoc;
       uint32 str_len;
       uint16 buffer[str_len];
};

struct LPWSTR {
       UNISTR2 *str;
};

struct VERSION {
       uint32 version;
       uint32 build;
       uint32 osversion;
};

struct NTTIME {
       uint32 low;
       uint32 high;
};

struct DWORD {
       uint32 x;
};

struct PRINTER_DRIVER_INFO_LEVEL_3 {
	DWORD cversion;
	LPWSTR name;
	LPWSTR environment;
	LPWSTR driverpath;
	LPWSTR datafile;
	LPWSTR configfile;
	LPWSTR helpfile;
	LPWSTR monitorname;
	LPWSTR defaultdatatype;
	BUFFERP dependentfiles;
};

struct PRINTER_DRIVER_INFO_LEVEL_6 {
         DWORD   dummy1; 
	 DWORD   version; 
	 LPWSTR   name;       
	 LPWSTR environment;
	 LPWSTR driverpath;
	 LPWSTR datafile;
	 LPWSTR configfile;
	 LPWSTR helpfile;
	 LPWSTR monitorname;
	 LPWSTR defaultdatatype;
	 BUFFERP  dependentfiles;
	 BUFFERP  previousnames;
	 NTTIME   driverdate; 
	 VERSION driverversion; 
	 LPWSTR mfgname; 
	 LPWSTR oemurl; 
	 LPWSTR hardwareid; 
	 LPWSTR provider; 
};


struct PRINTER_DRIVER_INFO {
       uint32 level;
       union *info[level] {
	      case 3 PRINTER_DRIVER_INFO_LEVEL_3 info_3;
	      case 6 PRINTER_DRIVER_INFO_LEVEL_6 info_6;
       }
};


struct R_GETPRINTERDATA {
	uint32 type;
	uint32 size;
	uint8 *data;
	uint32 needed;
	uint32 status;
};

