#ifndef _WINSPOOL_
#define _WINSPOOL_
#include <winapifamily.h>
#ifdef _WINUSER_
#include <prsht.h>
#endif
#ifdef __cplusplus
extern
"C"
{
#endif
#if _MSC_VER >= 1200
#pragma warning(push)
#pragma warning(disable:4820) // padding added after data member
#endif
#pragma warning(disable:
4820
)
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
typedef
struct
{
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef PRINTER_INFO_1A PRINTER_INFO_1;
typedef PPRINTER_INFO_1A PPRINTER_INFO_1;
typedef LPPRINTER_INFO_1A LPPRINTER_INFO_1;
#endif // UNICODE
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef PRINTER_INFO_2A PRINTER_INFO_2;
typedef PPRINTER_INFO_2A PPRINTER_INFO_2;
typedef LPPRINTER_INFO_2A LPPRINTER_INFO_2;
#endif // UNICODE
typedef
struct
{
;
}
, *
, *
;
typedef
struct
{
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef PRINTER_INFO_4A PRINTER_INFO_4;
typedef PPRINTER_INFO_4A PPRINTER_INFO_4;
typedef LPPRINTER_INFO_4A LPPRINTER_INFO_4;
#endif // UNICODE
typedef
struct
{
;
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef PRINTER_INFO_5A PRINTER_INFO_5;
typedef PPRINTER_INFO_5A PPRINTER_INFO_5;
typedef LPPRINTER_INFO_5A LPPRINTER_INFO_5;
#endif // UNICODE
typedef
struct
{
;
}
, *
, *
;
typedef
struct
{
;
;
}
, *
, *
;
typedef
struct
{
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef PRINTER_INFO_7A PRINTER_INFO_7;
typedef PPRINTER_INFO_7A PPRINTER_INFO_7;
typedef LPPRINTER_INFO_7A LPPRINTER_INFO_7;
#endif // UNICODE
#define DSPRINT_PUBLISH 0x00000001
#define DSPRINT_UPDATE 0x00000002
#define DSPRINT_UNPUBLISH 0x00000004
#define DSPRINT_REPUBLISH 0x00000008
#define DSPRINT_PENDING 0x80000000
typedef
struct
{
;
}
, *
, *
;
typedef
struct
{
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef PRINTER_INFO_8A PRINTER_INFO_8;
typedef PPRINTER_INFO_8A PPRINTER_INFO_8;
typedef LPPRINTER_INFO_8A LPPRINTER_INFO_8;
#endif // UNICODE
typedef
struct
{
;
}
, *
, *
;
typedef
struct
{
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef PRINTER_INFO_9A PRINTER_INFO_9;
typedef PPRINTER_INFO_9A PPRINTER_INFO_9;
typedef LPPRINTER_INFO_9A LPPRINTER_INFO_9;
#endif // UNICODE
#define PRINTER_CONTROL_PAUSE 1
#define PRINTER_CONTROL_RESUME 2
#define PRINTER_CONTROL_PURGE 3
#define PRINTER_CONTROL_SET_STATUS 4
#define PRINTER_STATUS_PAUSED 0x00000001
#define PRINTER_STATUS_ERROR 0x00000002
#define PRINTER_STATUS_PENDING_DELETION 0x00000004
#define PRINTER_STATUS_PAPER_JAM 0x00000008
#define PRINTER_STATUS_PAPER_OUT 0x00000010
#define PRINTER_STATUS_MANUAL_FEED 0x00000020
#define PRINTER_STATUS_PAPER_PROBLEM 0x00000040
#define PRINTER_STATUS_OFFLINE 0x00000080
#define PRINTER_STATUS_IO_ACTIVE 0x00000100
#define PRINTER_STATUS_BUSY 0x00000200
#define PRINTER_STATUS_PRINTING 0x00000400
#define PRINTER_STATUS_OUTPUT_BIN_FULL 0x00000800
#define PRINTER_STATUS_NOT_AVAILABLE 0x00001000
#define PRINTER_STATUS_WAITING 0x00002000
#define PRINTER_STATUS_PROCESSING 0x00004000
#define PRINTER_STATUS_INITIALIZING 0x00008000
#define PRINTER_STATUS_WARMING_UP 0x00010000
#define PRINTER_STATUS_TONER_LOW 0x00020000
#define PRINTER_STATUS_NO_TONER 0x00040000
#define PRINTER_STATUS_PAGE_PUNT 0x00080000
#define PRINTER_STATUS_USER_INTERVENTION 0x00100000
#define PRINTER_STATUS_OUT_OF_MEMORY 0x00200000
#define PRINTER_STATUS_DOOR_OPEN 0x00400000
#define PRINTER_STATUS_SERVER_UNKNOWN 0x00800000
#define PRINTER_STATUS_POWER_SAVE 0x01000000
#define PRINTER_STATUS_SERVER_OFFLINE 0x02000000
#define PRINTER_STATUS_DRIVER_UPDATE_NEEDED 0x04000000
#define PRINTER_ATTRIBUTE_QUEUED 0x00000001
#define PRINTER_ATTRIBUTE_DIRECT 0x00000002
#define PRINTER_ATTRIBUTE_DEFAULT 0x00000004
#define PRINTER_ATTRIBUTE_SHARED 0x00000008
#define PRINTER_ATTRIBUTE_NETWORK 0x00000010
#define PRINTER_ATTRIBUTE_HIDDEN 0x00000020
#define PRINTER_ATTRIBUTE_LOCAL 0x00000040
#define PRINTER_ATTRIBUTE_ENABLE_DEVQ 0x00000080
#define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS 0x00000100
#define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST 0x00000200
#define PRINTER_ATTRIBUTE_WORK_OFFLINE 0x00000400
#define PRINTER_ATTRIBUTE_ENABLE_BIDI 0x00000800
#define PRINTER_ATTRIBUTE_RAW_ONLY 0x00001000
#define PRINTER_ATTRIBUTE_PUBLISHED 0x00002000
#if (NTDDI_VERSION >= NTDDI_WINXP)
#define PRINTER_ATTRIBUTE_FAX 0x00004000
#endif // (NTDDI_VERSION >= NTDDI_WINXP)
#if ((NTDDI_VERSION >= NTDDI_WS03) ||\
((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) && (SPVER(NTDDI_VERSION) >= 4)))
#define PRINTER_ATTRIBUTE_TS 0x00008000
#endif // ((NTDDI_VERSION >= NTDDI_WS03) ||\ ...
#if (NTDDI_VERSION >= NTDDI_VISTA)
#define PRINTER_ATTRIBUTE_PUSHED_USER 0x00020000
#define PRINTER_ATTRIBUTE_PUSHED_MACHINE 0x00040000
#define PRINTER_ATTRIBUTE_MACHINE 0x00080000
#define PRINTER_ATTRIBUTE_FRIENDLY_NAME 0x00100000
#define PRINTER_ATTRIBUTE_TS_GENERIC_DRIVER 0x00200000
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#if (NTDDI_VERSION >= NTDDI_WINBLUE) // NTDDI_WINTHRESHOLD)
#define PRINTER_ATTRIBUTE_PER_USER 0x00400000
#define PRINTER_ATTRIBUTE_ENTERPRISE_CLOUD 0x00800000
#endif // (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
#define NO_PRIORITY 0
#define MAX_PRIORITY 99
#define MIN_PRIORITY 1
#define DEF_PRIORITY 1
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef JOB_INFO_1A JOB_INFO_1;
typedef PJOB_INFO_1A PJOB_INFO_1;
typedef LPJOB_INFO_1A LPJOB_INFO_1;
#endif // UNICODE
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef JOB_INFO_2A JOB_INFO_2;
typedef PJOB_INFO_2A PJOB_INFO_2;
typedef LPJOB_INFO_2A LPJOB_INFO_2;
#endif // UNICODE
typedef
struct
{
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef JOB_INFO_4A JOB_INFO_4;
typedef PJOB_INFO_4A PJOB_INFO_4;
typedef LPJOB_INFO_4A LPJOB_INFO_4;
#endif // UNICODE
#define JOB_CONTROL_PAUSE 1
#define JOB_CONTROL_RESUME 2
#define JOB_CONTROL_CANCEL 3
#define JOB_CONTROL_RESTART 4
#define JOB_CONTROL_DELETE 5
#define JOB_CONTROL_SENT_TO_PRINTER 6
#define JOB_CONTROL_LAST_PAGE_EJECTED 7
#if (NTDDI_VERSION >= NTDDI_VISTA)
#define JOB_CONTROL_RETAIN 8
#define JOB_CONTROL_RELEASE 9
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#define JOB_STATUS_PAUSED 0x00000001
#define JOB_STATUS_ERROR 0x00000002
#define JOB_STATUS_DELETING 0x00000004
#define JOB_STATUS_SPOOLING 0x00000008
#define JOB_STATUS_PRINTING 0x00000010
#define JOB_STATUS_OFFLINE 0x00000020
#define JOB_STATUS_PAPEROUT 0x00000040
#define JOB_STATUS_PRINTED 0x00000080
#define JOB_STATUS_DELETED 0x00000100
#define JOB_STATUS_BLOCKED_DEVQ 0x00000200
#define JOB_STATUS_USER_INTERVENTION 0x00000400
#define JOB_STATUS_RESTART 0x00000800
#if (NTDDI_VERSION >= NTDDI_WINXP)
#define JOB_STATUS_COMPLETE 0x00001000
#endif // (NTDDI_VERSION >= NTDDI_WINXP)
#if (NTDDI_VERSION >= NTDDI_VISTA)
#define JOB_STATUS_RETAINED 0x00002000
#define JOB_STATUS_RENDERING_LOCALLY 0x00004000
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#define JOB_POSITION_UNSPECIFIED 0
typedef
struct
{
;
;
}
, *
, *
;
typedef
struct
{
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef ADDJOB_INFO_1A ADDJOB_INFO_1;
typedef PADDJOB_INFO_1A PADDJOB_INFO_1;
typedef LPADDJOB_INFO_1A LPADDJOB_INFO_1;
#endif // UNICODE
typedef
struct
{
;
}
, *
, *
;
typedef
struct
{
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef DRIVER_INFO_1A DRIVER_INFO_1;
typedef PDRIVER_INFO_1A PDRIVER_INFO_1;
typedef LPDRIVER_INFO_1A LPDRIVER_INFO_1;
#endif // UNICODE
typedef
struct
{
;
;
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef DRIVER_INFO_2A DRIVER_INFO_2;
typedef PDRIVER_INFO_2A PDRIVER_INFO_2;
typedef LPDRIVER_INFO_2A LPDRIVER_INFO_2;
#endif // UNICODE
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef DRIVER_INFO_3A DRIVER_INFO_3;
typedef PDRIVER_INFO_3A PDRIVER_INFO_3;
typedef LPDRIVER_INFO_3A LPDRIVER_INFO_3;
#endif // UNICODE
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef DRIVER_INFO_4A DRIVER_INFO_4;
typedef PDRIVER_INFO_4A PDRIVER_INFO_4;
typedef LPDRIVER_INFO_4A LPDRIVER_INFO_4;
#endif // UNICODE
typedef
struct
{
;
;
;
;
;
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef DRIVER_INFO_5A DRIVER_INFO_5;
typedef PDRIVER_INFO_5A PDRIVER_INFO_5;
typedef LPDRIVER_INFO_5A LPDRIVER_INFO_5;
#endif // UNICODE
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef DRIVER_INFO_6A DRIVER_INFO_6;
typedef PDRIVER_INFO_6A PDRIVER_INFO_6;
typedef LPDRIVER_INFO_6A LPDRIVER_INFO_6;
#endif // UNICODE
#define PRINTER_DRIVER_PACKAGE_AWARE 0x00000001
#define PRINTER_DRIVER_XPS 0x00000002
#define PRINTER_DRIVER_SANDBOX_ENABLED 0x00000004
#define PRINTER_DRIVER_CLASS 0x00000008
#define PRINTER_DRIVER_DERIVED 0x00000010
#define PRINTER_DRIVER_NOT_SHAREABLE 0x00000020
#define PRINTER_DRIVER_CATEGORY_FAX 0x00000040
#define PRINTER_DRIVER_CATEGORY_FILE 0x00000080
#define PRINTER_DRIVER_CATEGORY_VIRTUAL 0x00000100
#define PRINTER_DRIVER_CATEGORY_SERVICE 0x00000200
#define PRINTER_DRIVER_SOFT_RESET_REQUIRED 0x00000400
#define PRINTER_DRIVER_SANDBOX_DISABLED 0x00000800
#define PRINTER_DRIVER_CATEGORY_3D 0x00001000
#define PRINTER_DRIVER_CATEGORY_CLOUD 0x00002000
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
dwPrinterDriverAttributes
;
pszzCoreDriverDependencies
;
;
dwlMinInboxDriverVerVersion
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
dwPrinterDriverAttributes
;
pszzCoreDriverDependencies
;
;
dwlMinInboxDriverVerVersion
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef DRIVER_INFO_8A DRIVER_INFO_8;
typedef PDRIVER_INFO_8A PDRIVER_INFO_8;
typedef LPDRIVER_INFO_8A LPDRIVER_INFO_8;
#endif // UNICODE
#define DRIVER_KERNELMODE 0x00000001
#define DRIVER_USERMODE 0x00000002
#define DPD_DELETE_UNUSED_FILES 0x00000001
#define DPD_DELETE_SPECIFIC_VERSION 0x00000002
#define DPD_DELETE_ALL_FILES 0x00000004
#define APD_STRICT_UPGRADE 0x00000001
#define APD_STRICT_DOWNGRADE 0x00000002
#define APD_COPY_ALL_FILES 0x00000004
#define APD_COPY_NEW_FILES 0x00000008
#if (NTDDI_VERSION >= NTDDI_WINXP)
#define APD_COPY_FROM_DIRECTORY 0x00000010
#endif // (NTDDI_VERSION >= NTDDI_WINXP)
typedef
struct
{
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef DOC_INFO_1A DOC_INFO_1;
typedef PDOC_INFO_1A PDOC_INFO_1;
typedef LPDOC_INFO_1A LPDOC_INFO_1;
#endif // UNICODE
typedef
struct
{
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef FORM_INFO_1A FORM_INFO_1;
typedef PFORM_INFO_1A PFORM_INFO_1;
typedef LPFORM_INFO_1A LPFORM_INFO_1;
#endif // UNICODE
#if (NTDDI_VERSION >= NTDDI_VISTA)
#define STRING_NONE 0x00000001
#define STRING_MUIDLL 0x00000002
#define STRING_LANGPAIR 0x00000004
#define MAX_FORM_KEYWORD_LENGTH 63+1
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
;
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef FORM_INFO_2A FORM_INFO_2;
typedef PFORM_INFO_2A PFORM_INFO_2;
typedef LPFORM_INFO_2A LPFORM_INFO_2;
#endif // UNICODE
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
typedef
struct
{
;
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef DOC_INFO_2A DOC_INFO_2;
typedef PDOC_INFO_2A PDOC_INFO_2;
typedef LPDOC_INFO_2A LPDOC_INFO_2;
#endif // UNICODE
#define DI_CHANNEL 1 // start direct read/write channel,
#define DI_READ_SPOOL_JOB 3
typedef
struct
{
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef DOC_INFO_3A DOC_INFO_3;
typedef PDOC_INFO_3A PDOC_INFO_3;
typedef LPDOC_INFO_3A LPDOC_INFO_3;
#endif // UNICODE
#define DI_MEMORYMAP_WRITE 0x00000001
#define FORM_USER 0x00000000
#define FORM_BUILTIN 0x00000001
#define FORM_PRINTER 0x00000002
typedef
struct
{
;
}
, *
, *
;
typedef
struct
{
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef PRINTPROCESSOR_INFO_1A PRINTPROCESSOR_INFO_1;
typedef PPRINTPROCESSOR_INFO_1A PPRINTPROCESSOR_INFO_1;
typedef LPPRINTPROCESSOR_INFO_1A LPPRINTPROCESSOR_INFO_1;
#endif // UNICODE
#if (NTDDI_VERSION >= NTDDI_WINXP)
typedef
struct
{
;
;
;
;
}
, *
;
#define NORMAL_PRINT ( 0x00000000 )
#define REVERSE_PRINT ( 0x00000001 )
#endif // (NTDDI_VERSION >= NTDDI_WINXP)
#if (NTDDI_VERSION >= NTDDI_VISTA)
typedef
struct
{
;
;
;
;
;
;
;
;
;
}
, *
;
#define PPCAPS_RIGHT_THEN_DOWN ( 0x00000001 ) // 0x00000001
#define PPCAPS_DOWN_THEN_RIGHT ( 0x00000001 << 1 ) // 0x00000002
#define PPCAPS_LEFT_THEN_DOWN ( 0x00000001 << 2 ) // 0x00000004
#define PPCAPS_DOWN_THEN_LEFT ( 0x00000001 << 3 ) // 0x00000008
#define PPCAPS_BORDER_PRINT ( 0x00000001 ) // 0x00000001
#define PPCAPS_BOOKLET_EDGE ( 0x00000001 )
#define PPCAPS_REVERSE_PAGES_FOR_REVERSE_DUPLEX ( 0x00000001 )
#define PPCAPS_DONT_SEND_EXTRA_PAGES_FOR_DUPLEX ( 0x00000001 << 1 )
#define PPCAPS_SQUARE_SCALING ( 0x00000001 )
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
typedef
struct
{
;
}
, *
, *
;
typedef
struct
{
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef PORT_INFO_1A PORT_INFO_1;
typedef PPORT_INFO_1A PPORT_INFO_1;
typedef LPPORT_INFO_1A LPPORT_INFO_1;
#endif // UNICODE
typedef
struct
{
;
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef PORT_INFO_2A PORT_INFO_2;
typedef PPORT_INFO_2A PPORT_INFO_2;
typedef LPPORT_INFO_2A LPPORT_INFO_2;
#endif // UNICODE
#define PORT_TYPE_WRITE 0x0001
#define PORT_TYPE_READ 0x0002
#define PORT_TYPE_REDIRECTED 0x0004
#define PORT_TYPE_NET_ATTACHED 0x0008
typedef
struct
{
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef PORT_INFO_3A PORT_INFO_3;
typedef PPORT_INFO_3A PPORT_INFO_3;
typedef LPPORT_INFO_3A LPPORT_INFO_3;
#endif // UNICODE
#define PORT_STATUS_TYPE_ERROR 1
#define PORT_STATUS_TYPE_WARNING 2
#define PORT_STATUS_TYPE_INFO 3
#define PORT_STATUS_OFFLINE 1
#define PORT_STATUS_PAPER_JAM 2
#define PORT_STATUS_PAPER_OUT 3
#define PORT_STATUS_OUTPUT_BIN_FULL 4
#define PORT_STATUS_PAPER_PROBLEM 5
#define PORT_STATUS_NO_TONER 6
#define PORT_STATUS_DOOR_OPEN 7
#define PORT_STATUS_USER_INTERVENTION 8
#define PORT_STATUS_OUT_OF_MEMORY 9
#define PORT_STATUS_TONER_LOW 10
#define PORT_STATUS_WARMING_UP 11
#define PORT_STATUS_POWER_SAVE 12
typedef
struct
{
;
}
, *
, *
;
typedef
struct
{
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef MONITOR_INFO_1A MONITOR_INFO_1;
typedef PMONITOR_INFO_1A PMONITOR_INFO_1;
typedef LPMONITOR_INFO_1A LPMONITOR_INFO_1;
#endif // UNICODE
typedef
struct
{
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef MONITOR_INFO_2A MONITOR_INFO_2;
typedef PMONITOR_INFO_2A PMONITOR_INFO_2;
typedef LPMONITOR_INFO_2A LPMONITOR_INFO_2;
#endif // UNICODE
typedef
struct
{
;
}
, *
, *
;
typedef
struct
{
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef DATATYPES_INFO_1A DATATYPES_INFO_1;
typedef PDATATYPES_INFO_1A PDATATYPES_INFO_1;
typedef LPDATATYPES_INFO_1A LPDATATYPES_INFO_1;
#endif // UNICODE
typedef
struct
{
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef PRINTER_DEFAULTSA PRINTER_DEFAULTS;
typedef PPRINTER_DEFAULTSA PPRINTER_DEFAULTS;
typedef LPPRINTER_DEFAULTSA LPPRINTER_DEFAULTS;
#endif // UNICODE
typedef
struct
{
;
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef PRINTER_ENUM_VALUESA PRINTER_ENUM_VALUES;
typedef PPRINTER_ENUM_VALUESA PPRINTER_ENUM_VALUES;
typedef LPPRINTER_ENUM_VALUESA LPPRINTER_ENUM_VALUES;
#endif // UNICODE
_Success_(return != FALSE)
(
,
_Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded)
,
,
);
_Success_(return != FALSE)
(
,
_Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded)
,
,
);
#ifdef UNICODE
#define EnumPrinters EnumPrintersW
#else
#define EnumPrinters EnumPrintersA
#endif // !UNICODE
#define PRINTER_ENUM_DEFAULT 0x00000001
#define PRINTER_ENUM_LOCAL 0x00000002
#define PRINTER_ENUM_CONNECTIONS 0x00000004
#define PRINTER_ENUM_FAVORITE 0x00000004
#define PRINTER_ENUM_NAME 0x00000008
#define PRINTER_ENUM_REMOTE 0x00000010
#define PRINTER_ENUM_SHARED 0x00000020
#define PRINTER_ENUM_NETWORK 0x00000040
#define PRINTER_ENUM_EXPAND 0x00004000
#define PRINTER_ENUM_CONTAINER 0x00008000
#define PRINTER_ENUM_ICONMASK 0x00ff0000
#define PRINTER_ENUM_ICON1 0x00010000
#define PRINTER_ENUM_ICON2 0x00020000
#define PRINTER_ENUM_ICON3 0x00040000
#define PRINTER_ENUM_ICON4 0x00080000
#define PRINTER_ENUM_ICON5 0x00100000
#define PRINTER_ENUM_ICON6 0x00200000
#define PRINTER_ENUM_ICON7 0x00400000
#define PRINTER_ENUM_ICON8 0x00800000
#define PRINTER_ENUM_HIDE 0x01000000
#if (NTDDI_VERSION >= NTDDI_WINBLUE)
#define PRINTER_ENUM_CATEGORY_ALL 0x02000000
#define PRINTER_ENUM_CATEGORY_3D 0x04000000
#endif
#define SPOOL_FILE_PERSISTENT 0x00000001
#define SPOOL_FILE_TEMPORARY 0x00000002
(
);
(
);
(
);
(
_In_opt_ LPSTR pPrinterName,
_Out_ LPHANDLE phPrinter,
_In_opt_ LPPRINTER_DEFAULTSA pDefault
);
(
_In_opt_ LPWSTR pPrinterName,
_Out_ LPHANDLE phPrinter,
_In_opt_ LPPRINTER_DEFAULTSW pDefault
);
#ifdef UNICODE
#define OpenPrinter OpenPrinterW
#else
#define OpenPrinter OpenPrinterA
#endif // !UNICODE
(
_In_opt_ LPPRINTER_DEFAULTSA pDefault
);
(
_In_opt_ LPPRINTER_DEFAULTSW pDefault
);
#ifdef UNICODE
#define ResetPrinter ResetPrinterW
#else
#define ResetPrinter ResetPrinterA
#endif // !UNICODE
(
,
_In_range_(0, 4) DWORD Level,
_When_(Level == 0, _Reserved_)
_When_(Level == 1, _In_reads_bytes_opt_(sizeof(JOB_INFO_1)))
_When_(Level == 2, _In_reads_bytes_opt_(sizeof(JOB_INFO_2)))
_When_(Level == 4, _In_reads_bytes_opt_(sizeof(JOB_INFO_4)))
_When_(Level == 3, _In_reads_bytes_opt_(sizeof(JOB_INFO_3)))
,
);
(
,
_In_range_(0, 4) DWORD Level,
_When_(Level == 0, _Reserved_)
_When_(Level == 1, _In_reads_bytes_opt_(sizeof(JOB_INFO_1)))
_When_(Level == 2, _In_reads_bytes_opt_(sizeof(JOB_INFO_2)))
_When_(Level == 4, _In_reads_bytes_opt_(sizeof(JOB_INFO_4)))
_When_(Level == 3, _In_reads_bytes_opt_(sizeof(JOB_INFO_3)))
,
);
#ifdef UNICODE
#define SetJob SetJobW
#else
#define SetJob SetJobA
#endif // !UNICODE
(
,
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
(
,
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
#ifdef UNICODE
#define GetJob GetJobW
#else
#define GetJob GetJobA
#endif // !UNICODE
(
,
,
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
(
,
,
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
#ifdef UNICODE
#define EnumJobs EnumJobsW
#else
#define EnumJobs EnumJobsA
#endif // !UNICODE
(
_In_range_(1, 2)
,
_When_(Level == 1, _In_reads_bytes_(sizeof(PRINTER_INFO_1)))
_When_(Level == 2, _In_reads_bytes_(sizeof(PRINTER_INFO_2)))
);
(
_In_range_(1, 2)
,
_When_(Level == 1, _In_reads_bytes_(sizeof(PRINTER_INFO_1)))
_When_(Level == 2, _In_reads_bytes_(sizeof(PRINTER_INFO_2)))
);
#ifdef UNICODE
#define AddPrinter AddPrinterW
#else
#define AddPrinter AddPrinterA
#endif // !UNICODE
(
);
(
_In_range_(0, 9) DWORD Level,
_When_(Level == 0 && Command == PRINTER_CONTROL_SET_STATUS, _In_reads_bytes_(sizeof(DWORD)))
_When_(Level == 0 && Command != PRINTER_CONTROL_SET_STATUS, _In_opt_)
_When_(Level == 1, _In_reads_bytes_(sizeof(PRINTER_INFO_1)))
_When_(Level == 2, _In_reads_bytes_(sizeof(PRINTER_INFO_2)))
_When_(Level == 3, _In_reads_bytes_(sizeof(PRINTER_INFO_3)))
_When_(Level == 4, _In_reads_bytes_(sizeof(PRINTER_INFO_4)))
_When_(Level == 5, _In_reads_bytes_(sizeof(PRINTER_INFO_5)))
_When_(Level == 6, _In_reads_bytes_(sizeof(PRINTER_INFO_6)))
_When_(Level == 7, _In_reads_bytes_(sizeof(PRINTER_INFO_7)))
_When_(Level == 8, _In_reads_bytes_(sizeof(PRINTER_INFO_8)))
_When_(Level == 9, _In_reads_bytes_(sizeof(PRINTER_INFO_9)))
,
);
(
_In_range_(0, 9) DWORD Level,
_When_(Level == 0 && Command == PRINTER_CONTROL_SET_STATUS, _In_reads_bytes_(sizeof(DWORD)))
_When_(Level == 0 && Command != PRINTER_CONTROL_SET_STATUS, _In_opt_)
_When_(Level == 1, _In_reads_bytes_(sizeof(PRINTER_INFO_1)))
_When_(Level == 2, _In_reads_bytes_(sizeof(PRINTER_INFO_2)))
_When_(Level == 3, _In_reads_bytes_(sizeof(PRINTER_INFO_3)))
_When_(Level == 4, _In_reads_bytes_(sizeof(PRINTER_INFO_4)))
_When_(Level == 5, _In_reads_bytes_(sizeof(PRINTER_INFO_5)))
_When_(Level == 6, _In_reads_bytes_(sizeof(PRINTER_INFO_6)))
_When_(Level == 7, _In_reads_bytes_(sizeof(PRINTER_INFO_7)))
_When_(Level == 8, _In_reads_bytes_(sizeof(PRINTER_INFO_8)))
_When_(Level == 9, _In_reads_bytes_(sizeof(PRINTER_INFO_9)))
,
);
#ifdef UNICODE
#define SetPrinter SetPrinterW
#else
#define SetPrinter SetPrinterA
#endif // !UNICODE
(
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
(
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
#ifdef UNICODE
#define GetPrinter GetPrinterW
#else
#define GetPrinter GetPrinterA
#endif // !UNICODE
(
,
);
(
,
);
#ifdef UNICODE
#define AddPrinterDriver AddPrinterDriverW
#else
#define AddPrinterDriver AddPrinterDriverA
#endif // !UNICODE
(
_In_range_(2, 8) DWORD Level,
_When_(Level == 2, _In_reads_bytes_(sizeof(DRIVER_INFO_2)))
_When_(Level == 3, _In_reads_bytes_(sizeof(DRIVER_INFO_3)))
_When_(Level == 4, _In_reads_bytes_(sizeof(DRIVER_INFO_4)))
_When_(Level == 6, _In_reads_bytes_(sizeof(DRIVER_INFO_6)))
_When_(Level == 8, _In_reads_bytes_(sizeof(DRIVER_INFO_8)))
,
_In_ DWORD dwFileCopyFlags
);
(
_In_range_(2, 8) DWORD Level,
_When_(Level == 2, _In_reads_bytes_(sizeof(DRIVER_INFO_2)))
_When_(Level == 3, _In_reads_bytes_(sizeof(DRIVER_INFO_3)))
_When_(Level == 4, _In_reads_bytes_(sizeof(DRIVER_INFO_4)))
_When_(Level == 6, _In_reads_bytes_(sizeof(DRIVER_INFO_6)))
_When_(Level == 8, _In_reads_bytes_(sizeof(DRIVER_INFO_8)))
,
_In_ DWORD dwFileCopyFlags
);
#ifdef UNICODE
#define AddPrinterDriverEx AddPrinterDriverExW
#else
#define AddPrinterDriverEx AddPrinterDriverExA
#endif // !UNICODE
(
_In_opt_ LPSTR pEnvironment,
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
(
_In_opt_ LPWSTR pEnvironment,
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
#ifdef UNICODE
#define EnumPrinterDrivers EnumPrinterDriversW
#else
#define EnumPrinterDrivers EnumPrinterDriversA
#endif // !UNICODE
(
_In_opt_ LPSTR pEnvironment,
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
(
_In_opt_ LPWSTR pEnvironment,
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
#ifdef UNICODE
#define GetPrinterDriver GetPrinterDriverW
#else
#define GetPrinterDriver GetPrinterDriverA
#endif // !UNICODE
GetPrinterDriverDirectoryA
(
_In_opt_ LPSTR pEnvironment,
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
GetPrinterDriverDirectoryW
(
_In_opt_ LPWSTR pEnvironment,
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
#ifdef UNICODE
#define GetPrinterDriverDirectory GetPrinterDriverDirectoryW
#else
#define GetPrinterDriverDirectory GetPrinterDriverDirectoryA
#endif // !UNICODE
(
_In_opt_ LPSTR pEnvironment,
);
(
_In_opt_ LPWSTR pEnvironment,
);
#ifdef UNICODE
#define DeletePrinterDriver DeletePrinterDriverW
#else
#define DeletePrinterDriver DeletePrinterDriverA
#endif // !UNICODE
(
_In_opt_ LPSTR pEnvironment,
,
);
(
_In_opt_ LPWSTR pEnvironment,
,
);
#ifdef UNICODE
#define DeletePrinterDriverEx DeletePrinterDriverExW
#else
#define DeletePrinterDriverEx DeletePrinterDriverExA
#endif // !UNICODE
(
_In_opt_ LPSTR pEnvironment,
_In_ LPSTR pPrintProcessorName
);
(
_In_opt_ LPWSTR pEnvironment,
_In_ LPWSTR pPrintProcessorName
);
#ifdef UNICODE
#define AddPrintProcessor AddPrintProcessorW
#else
#define AddPrintProcessor AddPrintProcessorA
#endif // !UNICODE
(
_In_opt_ LPSTR pEnvironment,
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
(
_In_opt_ LPWSTR pEnvironment,
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
#ifdef UNICODE
#define EnumPrintProcessors EnumPrintProcessorsW
#else
#define EnumPrintProcessors EnumPrintProcessorsA
#endif // !UNICODE
GetPrintProcessorDirectoryA
(
_In_opt_ LPSTR pEnvironment,
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
GetPrintProcessorDirectoryW
(
_In_opt_ LPWSTR pEnvironment,
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
#ifdef UNICODE
#define GetPrintProcessorDirectory GetPrintProcessorDirectoryW
#else
#define GetPrintProcessorDirectory GetPrintProcessorDirectoryA
#endif // !UNICODE
_Success_(return != FALSE)
EnumPrintProcessorDatatypesA
(
_In_ LPSTR pPrintProcessorName,
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
_Success_(return != FALSE)
EnumPrintProcessorDatatypesW
(
_In_ LPWSTR pPrintProcessorName,
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
#ifdef UNICODE
#define EnumPrintProcessorDatatypes EnumPrintProcessorDatatypesW
#else
#define EnumPrintProcessorDatatypes EnumPrintProcessorDatatypesA
#endif // !UNICODE
(
_In_opt_ LPSTR pEnvironment,
_In_ LPSTR pPrintProcessorName
);
(
_In_opt_ LPWSTR pEnvironment,
_In_ LPWSTR pPrintProcessorName
);
#ifdef UNICODE
#define DeletePrintProcessor DeletePrintProcessorW
#else
#define DeletePrintProcessor DeletePrintProcessorA
#endif // !UNICODE
(
_In_range_(1, 3) DWORD Level,
_When_(Level == 1, _In_reads_bytes_(sizeof(DOC_INFO_1)))
_When_(Level == 3, _In_reads_bytes_(sizeof(DOC_INFO_3)))
);
(
_In_range_(1, 3) DWORD Level,
_When_(Level == 1, _In_reads_bytes_(sizeof(DOC_INFO_1)))
_When_(Level == 3, _In_reads_bytes_(sizeof(DOC_INFO_3)))
);
#ifdef UNICODE
#define StartDocPrinter StartDocPrinterW
#else
#define StartDocPrinter StartDocPrinterA
#endif // !UNICODE
(
);
(
_In_reads_bytes_(cbBuf)
,
,
);
(
_In_reads_bytes_opt_(cbBuf)
,
,
);
(
);
(
);
(
_Out_writes_bytes_(cbBuf)
,
,
_Out_ LPDWORD pNoBytesRead
);
(
);
(
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
(
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
#ifdef UNICODE
#define AddJob AddJobW
#else
#define AddJob AddJobA
#endif // !UNICODE
(
);
(
);
_When_(fMode == 0, _Post_satisfies_(return >= sizeof(DEVMODE)))
(
_Out_opt_ PDEVMODEA pDevModeOutput,
_In_opt_ PDEVMODEA pDevModeInput,
);
_When_(fMode == 0, _Post_satisfies_(return >= sizeof(DEVMODE)))
(
_Out_opt_ PDEVMODEW pDevModeOutput,
_In_opt_ PDEVMODEW pDevModeInput,
);
#ifdef UNICODE
#define DocumentProperties DocumentPropertiesW
#else
#define DocumentProperties DocumentPropertiesA
#endif // !UNICODE
AdvancedDocumentPropertiesA
(
_Inout_opt_ PDEVMODEA pDevModeOutput,
_In_opt_ PDEVMODEA pDevModeInput
);
AdvancedDocumentPropertiesW
(
_Inout_opt_ PDEVMODEW pDevModeOutput,
_In_opt_ PDEVMODEW pDevModeInput
);
#ifdef UNICODE
#define AdvancedDocumentProperties AdvancedDocumentPropertiesW
#else
#define AdvancedDocumentProperties AdvancedDocumentPropertiesA
#endif // !UNICODE
#if (NTDDI_VERSION >= NTDDI_WINXPSP1)
(
_Inout_opt_ LPDEVMODEA pDevModeOutput,
_In_opt_ LPSTR pDeviceName,
_In_opt_ LPDEVMODEA pDevModeInput,
);
#endif // (NTDDI_VERSION >= NTDDI_WINXPSP1)
(
_Out_writes_bytes_opt_(nSize)
,
,
);
(
_Out_writes_bytes_opt_(nSize)
,
,
);
#ifdef UNICODE
#define GetPrinterData GetPrinterDataW
#else
#define GetPrinterData GetPrinterDataA
#endif // !UNICODE
(
_Out_writes_bytes_opt_(nSize)
,
,
);
(
_Out_writes_bytes_opt_(nSize)
,
,
);
#ifdef UNICODE
#define GetPrinterDataEx GetPrinterDataExW
#else
#define GetPrinterDataEx GetPrinterDataExA
#endif // !UNICODE
(
,
_Out_writes_bytes_(cbValueName)
,
,
_Out_ LPDWORD pcbValueName,
_Out_writes_to_opt_(cbData, *pcbData)
,
,
_When_(pData != NULL, _Pre_notnull_)
_Out_opt_ LPDWORD pcbData
);
(
,
_Out_writes_bytes_(cbValueName)
,
,
_Out_ LPDWORD pcbValueName,
_Out_writes_to_opt_(cbData, *pcbData)
,
,
_When_(pData != NULL, _Pre_notnull_)
_Out_opt_ LPDWORD pcbData
);
#ifdef UNICODE
#define EnumPrinterData EnumPrinterDataW
#else
#define EnumPrinterData EnumPrinterDataA
#endif // !UNICODE
(
_Out_writes_bytes_opt_(cbEnumValues)
,
,
_Out_ LPDWORD pcbEnumValues,
_Out_ LPDWORD pnEnumValues
);
(
_Out_writes_bytes_opt_(cbEnumValues)
,
,
_Out_ LPDWORD pcbEnumValues,
_Out_ LPDWORD pnEnumValues
);
#ifdef UNICODE
#define EnumPrinterDataEx EnumPrinterDataExW
#else
#define EnumPrinterDataEx EnumPrinterDataExA
#endif // !UNICODE
(
_Out_writes_bytes_opt_(cbSubkey)
,
,
);
(
_Out_writes_bytes_opt_(cbSubkey)
,
,
);
#ifdef UNICODE
#define EnumPrinterKey EnumPrinterKeyW
#else
#define EnumPrinterKey EnumPrinterKeyA
#endif // !UNICODE
(
,
_In_reads_bytes_(cbData)
,
);
(
,
_In_reads_bytes_(cbData)
,
);
#ifdef UNICODE
#define SetPrinterData SetPrinterDataW
#else
#define SetPrinterData SetPrinterDataA
#endif // !UNICODE
(
,
_In_reads_bytes_(cbData)
,
);
(
,
_In_reads_bytes_(cbData)
,
);
#ifdef UNICODE
#define SetPrinterDataEx SetPrinterDataExW
#else
#define SetPrinterDataEx SetPrinterDataExA
#endif // !UNICODE
(
);
(
);
#ifdef UNICODE
#define DeletePrinterData DeletePrinterDataW
#else
#define DeletePrinterData DeletePrinterDataA
#endif // !UNICODE
(
);
(
);
#ifdef UNICODE
#define DeletePrinterDataEx DeletePrinterDataExW
#else
#define DeletePrinterDataEx DeletePrinterDataExA
#endif // !UNICODE
(
);
(
);
#ifdef UNICODE
#define DeletePrinterKey DeletePrinterKeyW
#else
#define DeletePrinterKey DeletePrinterKeyA
#endif // !UNICODE
#define PRINTER_NOTIFY_TYPE 0x00
#define JOB_NOTIFY_TYPE 0x01
#define SERVER_NOTIFY_TYPE 0x02
#define PRINTER_NOTIFY_FIELD_SERVER_NAME 0x00
#define PRINTER_NOTIFY_FIELD_PRINTER_NAME 0x01
#define PRINTER_NOTIFY_FIELD_SHARE_NAME 0x02
#define PRINTER_NOTIFY_FIELD_PORT_NAME 0x03
#define PRINTER_NOTIFY_FIELD_DRIVER_NAME 0x04
#define PRINTER_NOTIFY_FIELD_COMMENT 0x05
#define PRINTER_NOTIFY_FIELD_LOCATION 0x06
#define PRINTER_NOTIFY_FIELD_DEVMODE 0x07
#define PRINTER_NOTIFY_FIELD_SEPFILE 0x08
#define PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR 0x09
#define PRINTER_NOTIFY_FIELD_PARAMETERS 0x0A
#define PRINTER_NOTIFY_FIELD_DATATYPE 0x0B
#define PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR 0x0C
#define PRINTER_NOTIFY_FIELD_ATTRIBUTES 0x0D
#define PRINTER_NOTIFY_FIELD_PRIORITY 0x0E
#define PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY 0x0F
#define PRINTER_NOTIFY_FIELD_START_TIME 0x10
#define PRINTER_NOTIFY_FIELD_UNTIL_TIME 0x11
#define PRINTER_NOTIFY_FIELD_STATUS 0x12
#define PRINTER_NOTIFY_FIELD_STATUS_STRING 0x13
#define PRINTER_NOTIFY_FIELD_CJOBS 0x14
#define PRINTER_NOTIFY_FIELD_AVERAGE_PPM 0x15
#define PRINTER_NOTIFY_FIELD_TOTAL_PAGES 0x16
#define PRINTER_NOTIFY_FIELD_PAGES_PRINTED 0x17
#define PRINTER_NOTIFY_FIELD_TOTAL_BYTES 0x18
#define PRINTER_NOTIFY_FIELD_BYTES_PRINTED 0x19
#define PRINTER_NOTIFY_FIELD_OBJECT_GUID 0x1A
#if (NTDDI_VERSION >= NTDDI_VISTA)
#define PRINTER_NOTIFY_FIELD_FRIENDLY_NAME 0x1B
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#if (NTDDI_VERSION >= NTDDI_WIN8)
#define PRINTER_NOTIFY_FIELD_BRANCH_OFFICE_PRINTING 0x1C
#endif // (NTDDI_VERSION >= NTDDI_WIN8)
#define JOB_NOTIFY_FIELD_PRINTER_NAME 0x00
#define JOB_NOTIFY_FIELD_MACHINE_NAME 0x01
#define JOB_NOTIFY_FIELD_PORT_NAME 0x02
#define JOB_NOTIFY_FIELD_USER_NAME 0x03
#define JOB_NOTIFY_FIELD_NOTIFY_NAME 0x04
#define JOB_NOTIFY_FIELD_DATATYPE 0x05
#define JOB_NOTIFY_FIELD_PRINT_PROCESSOR 0x06
#define JOB_NOTIFY_FIELD_PARAMETERS 0x07
#define JOB_NOTIFY_FIELD_DRIVER_NAME 0x08
#define JOB_NOTIFY_FIELD_DEVMODE 0x09
#define JOB_NOTIFY_FIELD_STATUS 0x0A
#define JOB_NOTIFY_FIELD_STATUS_STRING 0x0B
#define JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR 0x0C
#define JOB_NOTIFY_FIELD_DOCUMENT 0x0D
#define JOB_NOTIFY_FIELD_PRIORITY 0x0E
#define JOB_NOTIFY_FIELD_POSITION 0x0F
#define JOB_NOTIFY_FIELD_SUBMITTED 0x10
#define JOB_NOTIFY_FIELD_START_TIME 0x11
#define JOB_NOTIFY_FIELD_UNTIL_TIME 0x12
#define JOB_NOTIFY_FIELD_TIME 0x13
#define JOB_NOTIFY_FIELD_TOTAL_PAGES 0x14
#define JOB_NOTIFY_FIELD_PAGES_PRINTED 0x15
#define JOB_NOTIFY_FIELD_TOTAL_BYTES 0x16
#define JOB_NOTIFY_FIELD_BYTES_PRINTED 0x17
#define JOB_NOTIFY_FIELD_REMOTE_JOB_ID 0x18
#if (NTDDI_VERSION >= NTDDI_WIN7)
#define SERVER_NOTIFY_FIELD_PRINT_DRIVER_ISOLATION_GROUP 0x00
#endif
#if (NTDDI_VERSION >= NTDDI_WINBLUE)
#define PRINTER_NOTIFY_CATEGORY_ALL 0x001000
#define PRINTER_NOTIFY_CATEGORY_3D 0x002000
#endif // (NTDDI_VERSION >= NTDDI_WINBLUE)
typedef
struct
_PRINTER_NOTIFY_OPTIONS_TYPE
{
;
;
;
;
;
;
}
PRINTER_NOTIFY_OPTIONS_TYPE
, *
PPRINTER_NOTIFY_OPTIONS_TYPE
, *
LPPRINTER_NOTIFY_OPTIONS_TYPE
;
#define PRINTER_NOTIFY_OPTIONS_REFRESH 0x01
typedef
struct
{
;
;
;
PPRINTER_NOTIFY_OPTIONS_TYPE
;
}
, *
, *
;
#define PRINTER_NOTIFY_INFO_DISCARDED 0x01
typedef
struct
_PRINTER_NOTIFY_INFO_DATA
{
;
;
;
;
union
{
[
2
];
struct
{
;
;
}
;
}
;
}
, *
PPRINTER_NOTIFY_INFO_DATA
, *
LPPRINTER_NOTIFY_INFO_DATA
;
typedef
struct
{
;
;
;
[
1
];
}
, *
, *
;
#if (NTDDI_VERSION >= NTDDI_WINXP)
typedef
struct
{
;
;
}
, *
;
typedef
struct
{
;
union
{
;
;
;
;
;
}
;
}
, *
, *
;
typedef
struct
{
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
[
1
];
}
, *
, *
;
typedef
struct
{
;
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
[
1
];
}
, *
, *
LPBIDI_RESPONSE_CONTAINER
;
#define BIDI_ACTION_ENUM_SCHEMA L"EnumSchema"
#define BIDI_ACTION_GET L"Get"
#define BIDI_ACTION_SET L"Set"
#define BIDI_ACTION_GET_ALL L"GetAll"
#define BIDI_ACTION_GET_WITH_ARGUMENT L"GetWithArgument"
typedef
enum
{
=
0
,
=
1
,
=
2
,
=
3
,
=
4
,
=
5
,
=
6
,
=
7
}
;
#define BIDI_ACCESS_ADMINISTRATOR 0x1
#define BIDI_ACCESS_USER 0x2
#define ERROR_BIDI_STATUS_OK 0
#define ERROR_BIDI_NOT_SUPPORTED ERROR_NOT_SUPPORTED
#define ERROR_BIDI_ERROR_BASE 13000
#define ERROR_BIDI_STATUS_WARNING (ERROR_BIDI_ERROR_BASE + 1)
#define ERROR_BIDI_SCHEMA_READ_ONLY (ERROR_BIDI_ERROR_BASE + 2)
#define ERROR_BIDI_SERVER_OFFLINE (ERROR_BIDI_ERROR_BASE + 3)
#define ERROR_BIDI_DEVICE_OFFLINE (ERROR_BIDI_ERROR_BASE + 4)
#define ERROR_BIDI_SCHEMA_NOT_SUPPORTED (ERROR_BIDI_ERROR_BASE + 5)
#define ERROR_BIDI_SET_DIFFERENT_TYPE (ERROR_BIDI_ERROR_BASE + 6)
#define ERROR_BIDI_SET_MULTIPLE_SCHEMAPATH (ERROR_BIDI_ERROR_BASE + 7)
#define ERROR_BIDI_SET_INVALID_SCHEMAPATH (ERROR_BIDI_ERROR_BASE + 8)
#define ERROR_BIDI_SET_UNKNOWN_FAILURE (ERROR_BIDI_ERROR_BASE + 9)
#define ERROR_BIDI_SCHEMA_WRITE_ONLY (ERROR_BIDI_ERROR_BASE + 10)
#define ERROR_BIDI_GET_REQUIRES_ARGUMENT (ERROR_BIDI_ERROR_BASE + 11)
#define ERROR_BIDI_GET_ARGUMENT_NOT_SUPPORTED (ERROR_BIDI_ERROR_BASE + 12)
#define ERROR_BIDI_GET_MISSING_ARGUMENT (ERROR_BIDI_ERROR_BASE + 13)
#define ERROR_BIDI_DEVICE_CONFIG_UNCHANGED (ERROR_BIDI_ERROR_BASE + 14)
#define ERROR_BIDI_NO_LOCALIZED_RESOURCES (ERROR_BIDI_ERROR_BASE + 15)
#define ERROR_BIDI_NO_BIDI_SCHEMA_EXTENSIONS (ERROR_BIDI_ERROR_BASE + 16)
#define ERROR_BIDI_UNSUPPORTED_CLIENT_LANGUAGE (ERROR_BIDI_ERROR_BASE + 17)
#define ERROR_BIDI_UNSUPPORTED_RESOURCE_FORMAT (ERROR_BIDI_ERROR_BASE + 18)
#endif // (NTDDI_VERSION >= NTDDI_WINXP)
(
);
FindFirstPrinterChangeNotification
(
,
,
_In_opt_ PVOID pPrinterNotifyOptions
);
FindNextPrinterChangeNotification
(
_Out_opt_ PDWORD pdwChange,
_In_opt_ LPVOID pvReserved,
_Out_opt_ LPVOID *ppPrinterNotifyInfo
);
(
_In_ PPRINTER_NOTIFY_INFO pPrinterNotifyInfo
);
FindClosePrinterChangeNotification
(
);
#define PRINTER_CHANGE_ADD_PRINTER 0x00000001
#define PRINTER_CHANGE_SET_PRINTER 0x00000002
#define PRINTER_CHANGE_DELETE_PRINTER 0x00000004
#define PRINTER_CHANGE_FAILED_CONNECTION_PRINTER 0x00000008
#define PRINTER_CHANGE_PRINTER 0x000000FF
#define PRINTER_CHANGE_ADD_JOB 0x00000100
#define PRINTER_CHANGE_SET_JOB 0x00000200
#define PRINTER_CHANGE_DELETE_JOB 0x00000400
#define PRINTER_CHANGE_WRITE_JOB 0x00000800
#define PRINTER_CHANGE_JOB 0x0000FF00
#define PRINTER_CHANGE_ADD_FORM 0x00010000
#define PRINTER_CHANGE_SET_FORM 0x00020000
#define PRINTER_CHANGE_DELETE_FORM 0x00040000
#define PRINTER_CHANGE_FORM 0x00070000
#define PRINTER_CHANGE_ADD_PORT 0x00100000
#define PRINTER_CHANGE_CONFIGURE_PORT 0x00200000
#define PRINTER_CHANGE_DELETE_PORT 0x00400000
#define PRINTER_CHANGE_PORT 0x00700000
#define PRINTER_CHANGE_ADD_PRINT_PROCESSOR 0x01000000
#define PRINTER_CHANGE_DELETE_PRINT_PROCESSOR 0x04000000
#define PRINTER_CHANGE_PRINT_PROCESSOR 0x07000000
#if (NTDDI_VERSION >= NTDDI_WIN7)
#define PRINTER_CHANGE_SERVER 0x08000000
#endif
#define PRINTER_CHANGE_ADD_PRINTER_DRIVER 0x10000000
#define PRINTER_CHANGE_SET_PRINTER_DRIVER 0x20000000
#define PRINTER_CHANGE_DELETE_PRINTER_DRIVER 0x40000000
#define PRINTER_CHANGE_PRINTER_DRIVER 0x70000000
#define PRINTER_CHANGE_TIMEOUT 0x80000000
#if (NTDDI_VERSION >= NTDDI_WIN7)
#define PRINTER_CHANGE_ALL 0x7F77FFFF
#else
#define PRINTER_CHANGE_ALL 0x7777FFFF
#endif
(
,
);
(
,
);
#ifdef UNICODE
#define PrinterMessageBox PrinterMessageBoxW
#else
#define PrinterMessageBox PrinterMessageBoxA
#endif // !UNICODE
#define PRINTER_ERROR_INFORMATION 0x80000000
#define PRINTER_ERROR_WARNING 0x40000000
#define PRINTER_ERROR_SEVERE 0x20000000
#define PRINTER_ERROR_OUTOFPAPER 0x00000001
#define PRINTER_ERROR_JAM 0x00000002
#define PRINTER_ERROR_OUTOFTONER 0x00000004
(
);
(
_In_range_(1, 2) DWORD Level,
_When_(Level == 1, _In_reads_bytes_(sizeof(FORM_INFO_1A)))
_When_(Level == 2, _In_reads_bytes_(sizeof(FORM_INFO_2A)))
);
(
_In_range_(1, 2) DWORD Level,
_When_(Level == 1, _In_reads_bytes_(sizeof(FORM_INFO_1W)))
_When_(Level == 2, _In_reads_bytes_(sizeof(FORM_INFO_2W)))
);
#ifdef UNICODE
#define AddForm AddFormW
#else
#define AddForm AddFormA
#endif // !UNICODE
(
);
(
);
#ifdef UNICODE
#define DeleteForm DeleteFormW
#else
#define DeleteForm DeleteFormA
#endif // !UNICODE
(
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
(
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
#ifdef UNICODE
#define GetForm GetFormW
#else
#define GetForm GetFormA
#endif // !UNICODE
(
_In_range_(1, 2) DWORD Level,
_When_(Level == 1, _In_reads_bytes_(sizeof(FORM_INFO_1A)))
_When_(Level == 2, _In_reads_bytes_(sizeof(FORM_INFO_2A)))
);
(
_In_range_(1, 2) DWORD Level,
_When_(Level == 1, _In_reads_bytes_(sizeof(FORM_INFO_1W)))
_When_(Level == 2, _In_reads_bytes_(sizeof(FORM_INFO_2W)))
);
#ifdef UNICODE
#define SetForm SetFormW
#else
#define SetForm SetFormA
#endif // !UNICODE
(
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
(
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
#ifdef UNICODE
#define EnumForms EnumFormsW
#else
#define EnumForms EnumFormsA
#endif // !UNICODE
(
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
(
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
#ifdef UNICODE
#define EnumMonitors EnumMonitorsW
#else
#define EnumMonitors EnumMonitorsA
#endif // !UNICODE
(
,
_In_reads_bytes_opt_(sizeof(MONITOR_INFO_2))
);
(
,
_In_reads_bytes_opt_(sizeof(MONITOR_INFO_2))
);
#ifdef UNICODE
#define AddMonitor AddMonitorW
#else
#define AddMonitor AddMonitorA
#endif // !UNICODE
(
_In_opt_ LPSTR pEnvironment,
);
(
_In_opt_ LPWSTR pEnvironment,
);
#ifdef UNICODE
#define DeleteMonitor DeleteMonitorW
#else
#define DeleteMonitor DeleteMonitorA
#endif // !UNICODE
(
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
(
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
#ifdef UNICODE
#define EnumPorts EnumPortsW
#else
#define EnumPorts EnumPortsA
#endif // !UNICODE
(
);
(
);
#ifdef UNICODE
#define AddPort AddPortW
#else
#define AddPort AddPortA
#endif // !UNICODE
(
);
(
);
#ifdef UNICODE
#define ConfigurePort ConfigurePortW
#else
#define ConfigurePort ConfigurePortA
#endif // !UNICODE
(
);
(
);
#ifdef UNICODE
#define DeletePort DeletePortW
#else
#define DeletePort DeletePortA
#endif // !UNICODE
(
_In_reads_bytes_opt_(cbInputData)
,
,
_Out_writes_bytes_opt_(cbOutputData)
,
,
_Out_ PDWORD pcbOutputNeeded,
_Out_opt_ PDWORD pdwStatus
);
#define XcvData XcvDataW
(
_Out_writes_opt_(*pcchBuffer) LPSTR pszBuffer,
_Inout_ LPDWORD pcchBuffer
);
(
_Out_writes_opt_(*pcchBuffer) LPWSTR pszBuffer,
_Inout_ LPDWORD pcchBuffer
);
#ifdef UNICODE
#define GetDefaultPrinter GetDefaultPrinterW
#else
#define GetDefaultPrinter GetDefaultPrinterA
#endif // !UNICODE
(
_In_opt_ LPCSTR pszPrinter
);
(
_In_opt_ LPCWSTR pszPrinter
);
#ifdef UNICODE
#define SetDefaultPrinter SetDefaultPrinterW
#else
#define SetDefaultPrinter SetDefaultPrinterA
#endif // !UNICODE
(
,
_In_reads_bytes_(sizeof(PORT_INFO_3))
);
(
,
_In_reads_bytes_(sizeof(PORT_INFO_3))
);
#ifdef UNICODE
#define SetPort SetPortW
#else
#define SetPort SetPortA
#endif // !UNICODE
(
);
(
);
#ifdef UNICODE
#define AddPrinterConnection AddPrinterConnectionW
#else
#define AddPrinterConnection AddPrinterConnectionA
#endif // !UNICODE
(
);
(
);
#ifdef UNICODE
#define DeletePrinterConnection DeletePrinterConnectionW
#else
#define DeletePrinterConnection DeletePrinterConnectionA
#endif // !UNICODE
(
);
typedef
struct
{
;
;
;
}
, *
, *
;
typedef
struct
{
;
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef PROVIDOR_INFO_1A PROVIDOR_INFO_1;
typedef PPROVIDOR_INFO_1A PPROVIDOR_INFO_1;
typedef LPPROVIDOR_INFO_1A LPPROVIDOR_INFO_1;
#endif // UNICODE
typedef
struct
{
;
}
, *
, *
;
typedef
struct
{
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef PROVIDOR_INFO_2A PROVIDOR_INFO_2;
typedef PPROVIDOR_INFO_2A PPROVIDOR_INFO_2;
typedef LPPROVIDOR_INFO_2A LPPROVIDOR_INFO_2;
#endif // UNICODE
(
_In_range_(1, 2) DWORD Level,
_When_(Level == 1, _In_reads_bytes_(sizeof(PROVIDOR_INFO_1)))
_When_(Level == 2, _In_reads_bytes_(sizeof(PROVIDOR_INFO_2)))
_In_ LPBYTE pProvidorInfo
);
(
_In_range_(1, 2) DWORD Level,
_When_(Level == 1, _In_reads_bytes_(sizeof(PROVIDOR_INFO_1)))
_When_(Level == 2, _In_reads_bytes_(sizeof(PROVIDOR_INFO_2)))
_In_ LPBYTE pProvidorInfo
);
#ifdef UNICODE
#define AddPrintProvidor AddPrintProvidorW
#else
#define AddPrintProvidor AddPrintProvidorA
#endif // !UNICODE
(
_In_opt_ LPSTR pEnvironment,
_In_ LPSTR pPrintProvidorName
);
(
_In_opt_ LPWSTR pEnvironment,
_In_ LPWSTR pPrintProvidorName
);
#ifdef UNICODE
#define DeletePrintProvidor DeletePrintProvidorW
#else
#define DeletePrintProvidor DeletePrintProvidorA
#endif // !UNICODE
#if (NTDDI_VERSION >= NTDDI_WINXPSP2)
(
_In_opt_ PDEVMODEA pDevmode,
);
(
_In_opt_ PDEVMODEW pDevmode,
);
#ifdef UNICODE
#define IsValidDevmode IsValidDevmodeW
#else
#define IsValidDevmode IsValidDevmodeA
#endif // !UNICODE
#endif // (NTDDI_VERSION >= NTDDI_WINXPSP2)
#define SPLREG_DEFAULT_SPOOL_DIRECTORY TEXT("DefaultSpoolDirectory")
#define SPLREG_PORT_THREAD_PRIORITY_DEFAULT TEXT("PortThreadPriorityDefault")
#define SPLREG_PORT_THREAD_PRIORITY TEXT("PortThreadPriority")
#define SPLREG_SCHEDULER_THREAD_PRIORITY_DEFAULT TEXT("SchedulerThreadPriorityDefault")
#define SPLREG_SCHEDULER_THREAD_PRIORITY TEXT("SchedulerThreadPriority")
#define SPLREG_BEEP_ENABLED TEXT("BeepEnabled")
#define SPLREG_NET_POPUP TEXT("NetPopup")
#define SPLREG_RETRY_POPUP TEXT("RetryPopup")
#define SPLREG_NET_POPUP_TO_COMPUTER TEXT("NetPopupToComputer")
#define SPLREG_EVENT_LOG TEXT("EventLog")
#define SPLREG_MAJOR_VERSION TEXT("MajorVersion")
#define SPLREG_MINOR_VERSION TEXT("MinorVersion")
#define SPLREG_ARCHITECTURE TEXT("Architecture")
#if (NTDDI_VERSION >= NTDDI_WINXP)
#define SPLREG_OS_VERSION TEXT("OSVersion")
#endif // (NTDDI_VERSION >= NTDDI_WINXP)
#define SPLREG_OS_VERSIONEX TEXT("OSVersionEx")
#define SPLREG_DS_PRESENT TEXT("DsPresent")
#define SPLREG_DS_PRESENT_FOR_USER TEXT("DsPresentForUser")
#define SPLREG_REMOTE_FAX TEXT("RemoteFax")
#define SPLREG_RESTART_JOB_ON_POOL_ERROR TEXT("RestartJobOnPoolError")
#define SPLREG_RESTART_JOB_ON_POOL_ENABLED TEXT("RestartJobOnPoolEnabled")
#define SPLREG_DNS_MACHINE_NAME TEXT("DNSMachineName")
#if ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) && (SPVER(NTDDI_VERSION) >= 2) || \
(NTDDI_VERSION >= NTDDI_WS03SP1))
#define SPLREG_ALLOW_USER_MANAGEFORMS TEXT("AllowUserManageForms")
#endif // ((OSVER(NTDDI_VERSION) == NTDDI_WINXP) ...
#if (NTDDI_VERSION >= NTDDI_WS03)
#define SPLREG_WEBSHAREMGMT TEXT("WebShareMgmt")
#endif // (NTDDI_VERSION >= NTDDI_WS03)
#if (NTDDI_VERSION >= NTDDI_WIN7)
#define SPLREG_PRINT_DRIVER_ISOLATION_GROUPS_SEPARATOR L'\\'
#define SPLREG_PRINT_DRIVER_ISOLATION_GROUPS TEXT("PrintDriverIsolationGroups")
#define SPLREG_PRINT_DRIVER_ISOLATION_TIME_BEFORE_RECYCLE TEXT("PrintDriverIsolationTimeBeforeRecycle")
#define SPLREG_PRINT_DRIVER_ISOLATION_MAX_OBJECTS_BEFORE_RECYCLE TEXT("PrintDriverIsolationMaxobjsBeforeRecycle")
#define SPLREG_PRINT_DRIVER_ISOLATION_IDLE_TIMEOUT TEXT("PrintDriverIsolationIdleTimeout")
#define SPLREG_PRINT_DRIVER_ISOLATION_EXECUTION_POLICY TEXT("PrintDriverIsolationExecutionPolicy")
#define SPLREG_PRINT_DRIVER_ISOLATION_OVERRIDE_POLICY TEXT("PrintDriverIsolationOverrideCompat")
#endif // (NTDDI_VERSION >= NTDDI_WIN7)
#if (NTDDI_VERSION >= NTDDI_WIN8)
#define SPLREG_PRINT_QUEUE_V4_DRIVER_DIRECTORY TEXT("PrintQueueV4DriverDirectory")
#endif // (NTDDI_VERSION >= NTDDI_WIN8)
#define SERVER_ACCESS_ADMINISTER 0x00000001
#define SERVER_ACCESS_ENUMERATE 0x00000002
#define PRINTER_ACCESS_ADMINISTER 0x00000004
#define PRINTER_ACCESS_USE 0x00000008
#define JOB_ACCESS_ADMINISTER 0x00000010
#if ((NTDDI_VERSION >= NTDDI_WINXPSP1) || \
((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) && (SPVER(NTDDI_VERSION) >= 3)))
#define JOB_ACCESS_READ 0x00000020
#endif // ((NTDDI_VERSION >= NTDDI_WINXPSP1) ...
#if (NTDDI_VERSION >= NTDDI_WINBLUE)
#define PRINTER_ACCESS_MANAGE_LIMITED 0x00000040
#endif // (NTDDI_VERSION >= NTDDI_WINBLUE)
#define SERVER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\
SERVER_ACCESS_ADMINISTER |\
SERVER_ACCESS_ENUMERATE)
#define SERVER_READ (STANDARD_RIGHTS_READ |\
SERVER_ACCESS_ENUMERATE)
#define SERVER_WRITE (STANDARD_RIGHTS_WRITE |\
SERVER_ACCESS_ADMINISTER |\
SERVER_ACCESS_ENUMERATE)
#define SERVER_EXECUTE (STANDARD_RIGHTS_EXECUTE |\
SERVER_ACCESS_ENUMERATE)
#define PRINTER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\
PRINTER_ACCESS_ADMINISTER |\
PRINTER_ACCESS_USE)
#define PRINTER_READ (STANDARD_RIGHTS_READ |\
PRINTER_ACCESS_USE)
#define PRINTER_WRITE (STANDARD_RIGHTS_WRITE |\
PRINTER_ACCESS_USE)
#define PRINTER_EXECUTE (STANDARD_RIGHTS_EXECUTE |\
PRINTER_ACCESS_USE)
#if ((NTDDI_VERSION >= NTDDI_WINXPSP1) || \
((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) && (SPVER(NTDDI_VERSION) >= 3)))
#define JOB_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\
JOB_ACCESS_ADMINISTER |\
JOB_ACCESS_READ)
#else
#define JOB_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\
JOB_ACCESS_ADMINISTER)
#endif
#if ((NTDDI_VERSION >= NTDDI_WINXPSP1) || \
((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) && (SPVER(NTDDI_VERSION) >= 3)))
#define JOB_READ (STANDARD_RIGHTS_READ |\
JOB_ACCESS_READ)
#else
#define JOB_READ (STANDARD_RIGHTS_READ |\
JOB_ACCESS_ADMINISTER)
#endif
#define JOB_WRITE (STANDARD_RIGHTS_WRITE |\
JOB_ACCESS_ADMINISTER)
#define JOB_EXECUTE (STANDARD_RIGHTS_EXECUTE |\
JOB_ACCESS_ADMINISTER)
#define SPLDS_SPOOLER_KEY TEXT("DsSpooler")
#define SPLDS_DRIVER_KEY TEXT("DsDriver")
#define SPLDS_USER_KEY TEXT("DsUser")
#define SPLDS_ASSET_NUMBER TEXT("assetNumber")
#define SPLDS_BYTES_PER_MINUTE TEXT("bytesPerMinute")
#define SPLDS_DESCRIPTION TEXT("description")
#define SPLDS_DRIVER_NAME TEXT("driverName")
#define SPLDS_DRIVER_VERSION TEXT("driverVersion")
#define SPLDS_LOCATION TEXT("location")
#define SPLDS_PORT_NAME TEXT("portName")
#define SPLDS_PRINT_ATTRIBUTES TEXT("printAttributes")
#define SPLDS_PRINT_BIN_NAMES TEXT("printBinNames")
#define SPLDS_PRINT_COLLATE TEXT("printCollate")
#define SPLDS_PRINT_COLOR TEXT("printColor")
#define SPLDS_PRINT_DUPLEX_SUPPORTED TEXT("printDuplexSupported")
#define SPLDS_PRINT_END_TIME TEXT("printEndTime")
#define SPLDS_PRINTER_CLASS TEXT("printQueue")
#define SPLDS_PRINTER_NAME TEXT("printerName")
#define SPLDS_PRINT_KEEP_PRINTED_JOBS TEXT("printKeepPrintedJobs")
#define SPLDS_PRINT_LANGUAGE TEXT("printLanguage")
#define SPLDS_PRINT_MAC_ADDRESS TEXT("printMACAddress")
#define SPLDS_PRINT_MAX_X_EXTENT TEXT("printMaxXExtent")
#define SPLDS_PRINT_MAX_Y_EXTENT TEXT("printMaxYExtent")
#define SPLDS_PRINT_MAX_RESOLUTION_SUPPORTED TEXT("printMaxResolutionSupported")
#define SPLDS_PRINT_MEDIA_READY TEXT("printMediaReady")
#define SPLDS_PRINT_MEDIA_SUPPORTED TEXT("printMediaSupported")
#define SPLDS_PRINT_MEMORY TEXT("printMemory")
#define SPLDS_PRINT_MIN_X_EXTENT TEXT("printMinXExtent")
#define SPLDS_PRINT_MIN_Y_EXTENT TEXT("printMinYExtent")
#define SPLDS_PRINT_NETWORK_ADDRESS TEXT("printNetworkAddress")
#define SPLDS_PRINT_NOTIFY TEXT("printNotify")
#define SPLDS_PRINT_NUMBER_UP TEXT("printNumberUp")
#define SPLDS_PRINT_ORIENTATIONS_SUPPORTED TEXT("printOrientationsSupported")
#define SPLDS_PRINT_OWNER TEXT("printOwner")
#define SPLDS_PRINT_PAGES_PER_MINUTE TEXT("printPagesPerMinute")
#define SPLDS_PRINT_RATE TEXT("printRate")
#define SPLDS_PRINT_RATE_UNIT TEXT("printRateUnit")
#define SPLDS_PRINT_SEPARATOR_FILE TEXT("printSeparatorFile")
#define SPLDS_PRINT_SHARE_NAME TEXT("printShareName")
#define SPLDS_PRINT_SPOOLING TEXT("printSpooling")
#define SPLDS_PRINT_STAPLING_SUPPORTED TEXT("printStaplingSupported")
#define SPLDS_PRINT_START_TIME TEXT("printStartTime")
#define SPLDS_PRINT_STATUS TEXT("printStatus")
#define SPLDS_PRIORITY TEXT("priority")
#define SPLDS_SERVER_NAME TEXT("serverName")
#define SPLDS_SHORT_SERVER_NAME TEXT("shortServerName")
#define SPLDS_UNC_NAME TEXT("uNCName")
#define SPLDS_URL TEXT("url")
#define SPLDS_FLAGS TEXT("flags")
#define SPLDS_VERSION_NUMBER TEXT("versionNumber")
#define SPLDS_PRINTER_NAME_ALIASES TEXT("printerNameAliases") // MULTI_SZ
#define SPLDS_PRINTER_LOCATIONS TEXT("printerLocations") // MULTI_SZ
#define SPLDS_PRINTER_MODEL TEXT("printerModel") // SZ
#if (NTDDI_VERSION >= NTDDI_VISTA)
typedef
enum
{
=
1
<<
0
,
=
1
<<
1
,
PRINTER_OPTION_CLIENT_CHANGE
=
1
<<
2
,
PRINTER_OPTION_NO_CLIENT_DATA
=
1
<<
3
,
}
;
typedef
struct
{
;
;
}
, *
, *
;
typedef
struct
{
;
;
}
, *
, *
;
#ifdef UNICODE
typedef
;
typedef
;
typedef
;
#else
typedef PRINTER_OPTIONSA PRINTER_OPTIONS;
typedef PPRINTER_OPTIONSA PPRINTER_OPTIONS;
typedef LPPRINTER_OPTIONSA LPPRINTER_OPTIONS;
#endif // UNICODE
(
_In_opt_ LPCSTR pPrinterName,
_Out_ LPHANDLE phPrinter,
_In_opt_ PPRINTER_DEFAULTSA pDefault,
_In_opt_ PPRINTER_OPTIONSA pOptions
);
(
_In_opt_ LPCWSTR pPrinterName,
_Out_ LPHANDLE phPrinter,
_In_opt_ PPRINTER_DEFAULTSW pDefault,
_In_opt_ PPRINTER_OPTIONSW pOptions
);
#ifdef UNICODE
#define OpenPrinter2 OpenPrinter2W
#else
#define OpenPrinter2 OpenPrinter2A
#endif // !UNICODE
#define PRINTER_CONNECTION_MISMATCH 0x00000020 // printer should be mismatched
#define PRINTER_CONNECTION_NO_UI 0x00000040 // Fail call if UI is needed in order to install printer driver
typedef
struct
_PRINTER_CONNECTION_INFO_1A
{
;
;
}
PRINTER_CONNECTION_INFO_1A
, *
PPRINTER_CONNECTION_INFO_1A
;
typedef
struct
_PRINTER_CONNECTION_INFO_1W
{
;
;
}
PRINTER_CONNECTION_INFO_1W
, *
PPRINTER_CONNECTION_INFO_1W
;
#ifdef UNICODE
typedef
PRINTER_CONNECTION_INFO_1W
PRINTER_CONNECTION_INFO_1
;
typedef
PPRINTER_CONNECTION_INFO_1W
PPRINTER_CONNECTION_INFO_1
;
#else
typedef PRINTER_CONNECTION_INFO_1A PRINTER_CONNECTION_INFO_1;
typedef PPRINTER_CONNECTION_INFO_1A PPRINTER_CONNECTION_INFO_1;
#endif // UNICODE
(
,
_In_ PVOID pConnectionInfo
);
(
,
_In_ PVOID pConnectionInfo
);
#ifdef UNICODE
#define AddPrinterConnection2 AddPrinterConnection2W
#else
#define AddPrinterConnection2 AddPrinterConnection2A
#endif // !UNICODE
#define IPDFP_COPY_ALL_FILES 0x00000001
InstallPrinterDriverFromPackageA
(
_In_opt_ LPCSTR pszServer,
_In_opt_ LPCSTR pszInfPath,
_In_ LPCSTR pszDriverName,
_In_opt_ LPCSTR pszEnvironment,
);
InstallPrinterDriverFromPackageW
(
_In_opt_ LPCWSTR pszServer,
_In_opt_ LPCWSTR pszInfPath,
_In_ LPCWSTR pszDriverName,
_In_opt_ LPCWSTR pszEnvironment,
);
#ifdef UNICODE
#define InstallPrinterDriverFromPackage InstallPrinterDriverFromPackageW
#else
#define InstallPrinterDriverFromPackage InstallPrinterDriverFromPackageA
#endif // !UNICODE
#define UPDP_SILENT_UPLOAD 0x00000001 // If specified we will not show UI during UploadPrinterDriverPackage API.
#define UPDP_UPLOAD_ALWAYS 0x00000002 // Will not do the optimization of not uploading the files if the
#define UPDP_CHECK_DRIVERSTORE 0x00000004 // Check whether the given package exists in driver store or not.
UploadPrinterDriverPackageA
(
_In_opt_ LPCSTR pszServer,
_In_opt_ LPCSTR pszEnvironment,
_Out_writes_(*pcchDestInfPath)
,
_Inout_ PULONG pcchDestInfPath
);
UploadPrinterDriverPackageW
(
_In_opt_ LPCWSTR pszServer,
_In_opt_ LPCWSTR pszEnvironment,
_Out_writes_(*pcchDestInfPath)
,
_Inout_ PULONG pcchDestInfPath
);
#ifdef UNICODE
#define UploadPrinterDriverPackage UploadPrinterDriverPackageW
#else
#define UploadPrinterDriverPackage UploadPrinterDriverPackageA
#endif // !UNICODE
typedef
struct
{
;
;
;
CHAR szPackageID[MAX_PATH];
}
, *
;
typedef
struct
{
;
;
;
WCHAR szPackageID[MAX_PATH];
}
, *
;
#ifdef UNICODE
typedef
;
typedef
;
#else
typedef CORE_PRINTER_DRIVERA CORE_PRINTER_DRIVER;
typedef PCORE_PRINTER_DRIVERA PCORE_PRINTER_DRIVER;
#endif // UNICODE
(
_In_opt_ LPCSTR pszServer,
_In_opt_ LPCSTR pszEnvironment,
_In_ LPCSTR pszzCoreDriverDependencies,
pszzCoreDriverDependencies
,
_In_ DWORD cCorePrinterDrivers,
_Out_writes_(cCorePrinterDrivers) PCORE_PRINTER_DRIVERA pCorePrinterDrivers
);
(
_In_opt_ LPCWSTR pszServer,
_In_opt_ LPCWSTR pszEnvironment,
_In_ LPCWSTR pszzCoreDriverDependencies,
pszzCoreDriverDependencies
,
_In_ DWORD cCorePrinterDrivers,
_Out_writes_(cCorePrinterDrivers) PCORE_PRINTER_DRIVERW pCorePrinterDrivers
);
#ifdef UNICODE
#define GetCorePrinterDrivers GetCorePrinterDriversW
#else
#define GetCorePrinterDrivers GetCorePrinterDriversA
#endif // !UNICODE
CorePrinterDriverInstalledA
(
_In_opt_ LPCSTR pszServer,
_In_opt_ LPCSTR pszEnvironment,
_In_ GUID CoreDriverGUID,
_In_ FILETIME ftDriverDate,
_In_ DWORDLONG dwlDriverVersion,
_Out_ BOOL *pbDriverInstalled
);
CorePrinterDriverInstalledW
(
_In_opt_ LPCWSTR pszServer,
_In_opt_ LPCWSTR pszEnvironment,
_In_ GUID CoreDriverGUID,
_In_ FILETIME ftDriverDate,
_In_ DWORDLONG dwlDriverVersion,
_Out_ BOOL *pbDriverInstalled
);
#ifdef UNICODE
#define CorePrinterDriverInstalled CorePrinterDriverInstalledW
#else
#define CorePrinterDriverInstalled CorePrinterDriverInstalledA
#endif // !UNICODE
GetPrinterDriverPackagePathA
(
_In_opt_ LPCSTR pszServer,
_In_opt_ LPCSTR pszEnvironment,
_In_opt_ LPCSTR pszLanguage,
_In_ LPCSTR pszPackageID,
_Inout_updates_opt_(cchDriverPackageCab) LPSTR pszDriverPackageCab,
_In_opt_ DWORD cchDriverPackageCab,
_Out_ LPDWORD pcchRequiredSize
);
GetPrinterDriverPackagePathW
(
_In_opt_ LPCWSTR pszServer,
_In_opt_ LPCWSTR pszEnvironment,
_In_opt_ LPCWSTR pszLanguage,
_In_ LPCWSTR pszPackageID,
_Inout_updates_opt_(cchDriverPackageCab) LPWSTR pszDriverPackageCab,
_In_opt_ DWORD cchDriverPackageCab,
_Out_ LPDWORD pcchRequiredSize
);
#ifdef UNICODE
#define GetPrinterDriverPackagePath GetPrinterDriverPackagePathW
#else
#define GetPrinterDriverPackagePath GetPrinterDriverPackagePathA
#endif // !UNICODE
DeletePrinterDriverPackageA
(
_In_opt_ LPCSTR pszServer,
_In_opt_ LPCSTR pszEnvironment
);
DeletePrinterDriverPackageW
(
_In_opt_ LPCWSTR pszServer,
_In_opt_ LPCWSTR pszEnvironment
);
#ifdef UNICODE
#define DeletePrinterDriverPackage DeletePrinterDriverPackageW
#else
#define DeletePrinterDriverPackage DeletePrinterDriverPackageA
#endif // !UNICODE
typedef
enum
{
=
1
,
,
,
,
,
,
,
kPropertyTypeNotificationReply
,
kPropertyTypeNotificationOptions
,
}
;
typedef
enum
{
=
0
,
=
1
,
=
2
,
=
3
,
=
4
,
=
5
,
=
6
,
=
7
,
=
8
,
=
9
}
;
typedef
enum
{
=
1
,
}
;
typedef
struct
{
;
union
{
;
;
;
;
struct
{
;
;
}
;
}
;
}
;
typedef
struct
{
*
;
;
}
;
typedef
struct
{
;
*
;
}
PrintPropertiesCollection
;
ReportJobProcessingProgress
(
_In_ HANDLE printerHandle,
,
,
);
(
_In_opt_ LPSTR pEnvironment,
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
(
_In_opt_ LPWSTR pEnvironment,
,
_Out_writes_bytes_opt_(cbBuf)
,
,
);
#ifdef UNICODE
#define GetPrinterDriver2 GetPrinterDriver2W
#else
#define GetPrinterDriver2 GetPrinterDriver2A
#endif // !UNICODE
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#if (NTDDI_VERSION >= NTDDI_WIN7)
typedef
enum
{
PRINT_EXECUTION_CONTEXT_APPLICATION
=
0
,
PRINT_EXECUTION_CONTEXT_SPOOLER_SERVICE
=
1
,
PRINT_EXECUTION_CONTEXT_SPOOLER_ISOLATION_HOST
=
2
,
PRINT_EXECUTION_CONTEXT_FILTER_PIPELINE
=
3
,
PRINT_EXECUTION_CONTEXT_WOW64
=
4
}
;
typedef
struct
{
;
;
}
;
(
_Out_ PRINT_EXECUTION_DATA *pData
);
#endif // (NTDDI_VERSION >= NTDDI_WIN7)
#if (NTDDI_VERSION >= NTDDI_WIN8)
(
_Out_ PrintPropertyValue *pValue
);
void
(
_Inout_ PrintPropertyValue *pValue
);
void
FreePrintNamedPropertyArray
(
_Inout_opt_
_At_(*ppProperties, _Pre_readable_size_(cProperties) _Post_null_)
**
);
(
_In_ const PrintNamedProperty *pProperty
);
(
);
(
_Out_ DWORD *pcProperties,
_Outptr_result_buffer_(*pcProperties)
**
);
(
_Outptr_ PWSTR *ppszOutputFile
);
#define MS_PRINT_JOB_OUTPUT_FILE L"MsPrintJobOutputFile"
#endif // (NTDDI_VERSION >= NTDDI_WIN8)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#if _MSC_VER >= 1200
#pragma warning(pop)
#endif
#ifdef __cplusplus
}
#endif
#endif // _WINSPOOL_