typedef struct _JOB_INFO_1 { DWORD JobId; LPTSTR pPrinterName; LPTSTR pMachineName; LPTSTR pUserName; LPTSTR pDocument; LPTSTR pDatatype; LPTSTR pStatus; DWORD Status; DWORD Priority; DWORD Position; DWORD TotalPages; DWORD PagesPrinted; SYSTEMTIME Submitted; } JOB_INFO_1, *PJOB_INFO_1; Members JobId Specifies a job identifier. pPrinterName Pointer to a null-terminated string that specifies the name of the printer for which the job is spooled. pMachineName Pointer to a null-terminated string that specifies the name of the machine that created the print job. pUserName Pointer to a null-terminated string that specifies the name of the user that owns the print job. pDocument Pointer to a null-terminated string that specifies the name of the print job (for example, "MS-WORD: Review.doc"). pDatatype Pointer to a null-terminated string that specifies the type of data used to record the print job. pStatus Pointer to a null-terminated string that specifies the status of the print job. This member should be checked prior to Status and, if pStatus is NULL, the status is defined by the contents of the Status member. Status Specifies the job status. This member can be one or more of the following values. Value Meaning JOB_STATUS_BLOCKED_DEVQ The driver cannot print the job. JOB_STATUS_COMPLETE Windows XP: Job is sent to the printer, but the job may not be printed yet. See Res for more information. JOB_STATUS_DELETED Job has been deleted. JOB_STATUS_DELETING Job is being deleted. JOB_STATUS_ERROR An error is associated with the job. JOB_STATUS_OFFLINE Printer is offline. JOB_STATUS_PAPEROUT Printer is out of paper. JOB_STATUS_PAUSED Job is paused. JOB_STATUS_PRINTED Job has printed. JOB_STATUS_PRINTING Job is printing. JOB_STATUS_RESTART Job has been restarted. JOB_STATUS_SPOOLING Job is spooling. JOB_STATUS_USER_INTERVENTION Printer has an error that requires the user to do something. Priority Specifies the job priority. This member can be one of the following values or in the range between 1 through 99 (MIN_PRIORITY through MAX_PRIORITY). Value Meaning MIN_PRIORITY Minimum priority. MAX_PRIORITY Maximum priority. DEF_PRIORITY Default priority. Position Specifies the job's position in the print queue. TotalPages Specifies how many pages the document contains. This value may be zero if the print job does not contain page delimiting information. PagesPrinted Specifies the number of pages that have printed. This value may be zero if the print job does not contain page delimiting information. Submitted A SYSTEMTIME structure that specifies the time that this document was spooled. This time value is in Universal Time Coordinate (UTC) format. You should convert it to a local time value before displaying it. You can use the FileTimeToLocalFileTime function to perform the conversion. Res Windows XP: Port monitors that do not support TrueEndOfJob will set the job as JOB_STATUS_PRINTED right after the job is submitted to the printer.Requirements Windows NT/2000/XP: Included in Windows NT 3.1 and later. Windows 95/98/Me: Included in Windows 95 and later. Header: Declared in Winspool.h; include Windows.h. Unicode: Declared as Unicode and ANSI structures.
typedef struct _JOB_INFO_2 { DWORD JobId; LPTSTR pPrinterName; LPTSTR pMachineName; LPTSTR pUserName; LPTSTR pDocument; LPTSTR pNotifyName; LPTSTR pDatatype; LPTSTR pPrintProcessor; LPTSTR pParameters; LPTSTR pDriverName; LPDEVMODE pDevMode; LPTSTR pStatus; PSECURITY_DESCRIPTOR pSecurityDescriptor; DWORD Status; DWORD Priority; DWORD Position; DWORD StartTime; DWORD UntilTime; DWORD TotalPages; DWORD Size; SYSTEMTIME Submitted; DWORD Time; DWORD PagesPrinted; } JOB_INFO_2, *PJOB_INFO_2; Members JobId Specifies a job identifier value. pPrinterName Pointer to a null-terminated string that specifies the name of the printer for which the job is spooled. pMachineName Pointer to a null-terminated string that specifies the name of the machine that created the print job. pUserName Pointer to a null-terminated string that specifies the name of the user who owns the print job. pDocument Pointer to a null-terminated string that specifies the name of the print job (for example, "MS-WORD: Review.doc"). pNotifyName Pointer to a null-terminated string that specifies the name of the user who should be notified when the job has been printed or when an error occurs while printing the job. pDatatype Pointer to a null-terminated string that specifies the type of data used to record the print job. pPrintProcessor Pointer to a null-terminated string that specifies the name of the print processor that should be used to print the job. pParameters Pointer to a null-terminated string that specifies print-processor parameters. pDriverName Pointer to a null-terminated string that specifies the name of the printer driver that should be used to process the print job. pDevMode Pointer to a DEVMODE structure that contains device-initialization and environment data for the printer driver. pStatus Pointer to a null-terminated string that specifies the status of the print job. This member should be checked prior to Status and, if pStatus is NULL, the status is defined by the contents of the Status member. pSecurityDescriptor The value of this member is NULL. Retrieval and setting of document security descriptors is not supported in this release. Status Specifies the job status. This member can be one or more of the following values. Value Meaning JOB_STATUS_BLOCKED_DEVQ The driver cannot print the job. JOB_STATUS_COMPLETE Windows XP: Job is sent to the printer, but the job may not be printed yet. See Res for more information. JOB_STATUS_DELETED Job has been deleted. JOB_STATUS_DELETING Job is being deleted. JOB_STATUS_ERROR An error is associated with the job. JOB_STATUS_OFFLINE Printer is offline. JOB_STATUS_PAPEROUT Printer is out of paper. JOB_STATUS_PAUSED Job is paused. JOB_STATUS_PRINTED Job has printed. JOB_STATUS_PRINTING Job is printing. JOB_STATUS_RESTART Job has been restarted. JOB_STATUS_SPOOLING Job is spooling. JOB_STATUS_USER_INTERVENTION Printer has an error that requires the user to do something. Priority Specifies the job priority. This member can be one of the following values or in the range between 1 through 99 (MIN_PRIORITY through MAX_PRIORITY). Value Meaning MIN_PRIORITY Minimum priority. MAX_PRIORITY Maximum priority. DEF_PRIORITY Default priority. Position Specifies the job's position in the print queue. StartTime Specifies the earliest time that the job can be printed. UntilTime Specifies the latest time that the job can be printed. TotalPages Specifies the number of pages required for the job. This value may be zero if the print job does not contain page delimiting information. Size Specifies the size, in bytes, of the job. Submitted A SYSTEMTIME structure that specifies the time when the job was submitted. This time value is in Universal Time Coordinate (UTC) format. You should convert it to a local time value before displaying it. You can use the FileTimeToLocalFileTime function to perform the conversion. Time Specifies the total time, in milliseconds, that has elapsed since the job began printing. PagesPrinted Specifies the number of pages that have printed. This value may be zero if the print job does not contain page delimiting information. Res Windows XP: Port monitors that do not support TrueEndOfJob will set the job as JOB_STATUS_PRINTED right after the job is submitted to the printer.Requirements Windows NT/2000/XP: Included in Windows NT 3.1 and later. Windows 95/98/Me: Included in Windows 95 and later. Header: Declared in Winspool.h; include Windows.h. Unicode: Declared as Unicode and ANSI structures.
typedef struct _JOB_INFO_3 { DWORD JobId; DWORD NextJobId; DWORD Reserved; } JOB_INFO_3, *PJOB_INFO_3; Members JobId Print job identifier. NextJobId Print job identifier for the next print job in the linked set of print jobs. Reserved This value is reserved for future use. You must set it to zero.
目录树-Win32和COM开发
或者在“索引”页,把筛选依据设为“未筛选”,输入你想要找的函数名,就能找到
http://support.microsoft.com/kb/821769/zh-cn
http://msdn2.microsoft.com/en-gb/library/ms535514.aspx
http://msdn2.microsoft.com/en-gb/library/ms535687.aspx
DWORD JobId;
LPTSTR pPrinterName;
LPTSTR pMachineName;
LPTSTR pUserName;
LPTSTR pDocument;
LPTSTR pDatatype;
LPTSTR pStatus;
DWORD Status;
DWORD Priority;
DWORD Position;
DWORD TotalPages;
DWORD PagesPrinted;
SYSTEMTIME Submitted;
} JOB_INFO_1, *PJOB_INFO_1;
Members
JobId
Specifies a job identifier.
pPrinterName
Pointer to a null-terminated string that specifies the name of the printer for which the job is spooled.
pMachineName
Pointer to a null-terminated string that specifies the name of the machine that created the print job.
pUserName
Pointer to a null-terminated string that specifies the name of the user that owns the print job.
pDocument
Pointer to a null-terminated string that specifies the name of the print job (for example, "MS-WORD: Review.doc").
pDatatype
Pointer to a null-terminated string that specifies the type of data used to record the print job.
pStatus
Pointer to a null-terminated string that specifies the status of the print job. This member should be checked prior to Status and, if pStatus is NULL, the status is defined by the contents of the Status member.
Status
Specifies the job status. This member can be one or more of the following values. Value Meaning
JOB_STATUS_BLOCKED_DEVQ The driver cannot print the job.
JOB_STATUS_COMPLETE Windows XP: Job is sent to the printer, but the job may not be printed yet. See Res for more information.
JOB_STATUS_DELETED Job has been deleted.
JOB_STATUS_DELETING Job is being deleted.
JOB_STATUS_ERROR An error is associated with the job.
JOB_STATUS_OFFLINE Printer is offline.
JOB_STATUS_PAPEROUT Printer is out of paper.
JOB_STATUS_PAUSED Job is paused.
JOB_STATUS_PRINTED Job has printed.
JOB_STATUS_PRINTING Job is printing.
JOB_STATUS_RESTART Job has been restarted.
JOB_STATUS_SPOOLING Job is spooling.
JOB_STATUS_USER_INTERVENTION Printer has an error that requires the user to do something.
Priority
Specifies the job priority. This member can be one of the following values or in the range between 1 through 99 (MIN_PRIORITY through MAX_PRIORITY). Value Meaning
MIN_PRIORITY Minimum priority.
MAX_PRIORITY Maximum priority.
DEF_PRIORITY Default priority.
Position
Specifies the job's position in the print queue.
TotalPages
Specifies how many pages the document contains. This value may be zero if the print job does not contain page delimiting information.
PagesPrinted
Specifies the number of pages that have printed. This value may be zero if the print job does not contain page delimiting information.
Submitted
A SYSTEMTIME structure that specifies the time that this document was spooled.
This time value is in Universal Time Coordinate (UTC) format. You should convert it to a local time value before displaying it. You can use the FileTimeToLocalFileTime function to perform the conversion. Res
Windows XP: Port monitors that do not support TrueEndOfJob will set the job as JOB_STATUS_PRINTED right after the job is submitted to the printer.Requirements
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Winspool.h; include Windows.h.
Unicode: Declared as Unicode and ANSI structures.
DWORD JobId;
LPTSTR pPrinterName;
LPTSTR pMachineName;
LPTSTR pUserName;
LPTSTR pDocument;
LPTSTR pNotifyName;
LPTSTR pDatatype;
LPTSTR pPrintProcessor;
LPTSTR pParameters;
LPTSTR pDriverName;
LPDEVMODE pDevMode;
LPTSTR pStatus;
PSECURITY_DESCRIPTOR pSecurityDescriptor;
DWORD Status;
DWORD Priority;
DWORD Position;
DWORD StartTime;
DWORD UntilTime;
DWORD TotalPages;
DWORD Size;
SYSTEMTIME Submitted;
DWORD Time;
DWORD PagesPrinted;
} JOB_INFO_2, *PJOB_INFO_2;
Members
JobId
Specifies a job identifier value.
pPrinterName
Pointer to a null-terminated string that specifies the name of the printer for which the job is spooled.
pMachineName
Pointer to a null-terminated string that specifies the name of the machine that created the print job.
pUserName
Pointer to a null-terminated string that specifies the name of the user who owns the print job.
pDocument
Pointer to a null-terminated string that specifies the name of the print job (for example, "MS-WORD: Review.doc").
pNotifyName
Pointer to a null-terminated string that specifies the name of the user who should be notified when the job has been printed or when an error occurs while printing the job.
pDatatype
Pointer to a null-terminated string that specifies the type of data used to record the print job.
pPrintProcessor
Pointer to a null-terminated string that specifies the name of the print processor that should be used to print the job.
pParameters
Pointer to a null-terminated string that specifies print-processor parameters.
pDriverName
Pointer to a null-terminated string that specifies the name of the printer driver that should be used to process the print job.
pDevMode
Pointer to a DEVMODE structure that contains device-initialization and environment data for the printer driver.
pStatus
Pointer to a null-terminated string that specifies the status of the print job. This member should be checked prior to Status and, if pStatus is NULL, the status is defined by the contents of the Status member.
pSecurityDescriptor
The value of this member is NULL. Retrieval and setting of document security descriptors is not supported in this release.
Status
Specifies the job status. This member can be one or more of the following values. Value Meaning
JOB_STATUS_BLOCKED_DEVQ The driver cannot print the job.
JOB_STATUS_COMPLETE Windows XP: Job is sent to the printer, but the job may not be printed yet. See Res for more information.
JOB_STATUS_DELETED Job has been deleted.
JOB_STATUS_DELETING Job is being deleted.
JOB_STATUS_ERROR An error is associated with the job.
JOB_STATUS_OFFLINE Printer is offline.
JOB_STATUS_PAPEROUT Printer is out of paper.
JOB_STATUS_PAUSED Job is paused.
JOB_STATUS_PRINTED Job has printed.
JOB_STATUS_PRINTING Job is printing.
JOB_STATUS_RESTART Job has been restarted.
JOB_STATUS_SPOOLING Job is spooling.
JOB_STATUS_USER_INTERVENTION Printer has an error that requires the user to do something.
Priority
Specifies the job priority. This member can be one of the following values or in the range between 1 through 99 (MIN_PRIORITY through MAX_PRIORITY). Value Meaning
MIN_PRIORITY Minimum priority.
MAX_PRIORITY Maximum priority.
DEF_PRIORITY Default priority.
Position
Specifies the job's position in the print queue.
StartTime
Specifies the earliest time that the job can be printed.
UntilTime
Specifies the latest time that the job can be printed.
TotalPages
Specifies the number of pages required for the job. This value may be zero if the print job does not contain page delimiting information.
Size
Specifies the size, in bytes, of the job.
Submitted
A SYSTEMTIME structure that specifies the time when the job was submitted.
This time value is in Universal Time Coordinate (UTC) format. You should convert it to a local time value before displaying it. You can use the FileTimeToLocalFileTime function to perform the conversion. Time
Specifies the total time, in milliseconds, that has elapsed since the job began printing.
PagesPrinted
Specifies the number of pages that have printed. This value may be zero if the print job does not contain page delimiting information.
Res
Windows XP: Port monitors that do not support TrueEndOfJob will set the job as JOB_STATUS_PRINTED right after the job is submitted to the printer.Requirements
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Winspool.h; include Windows.h.
Unicode: Declared as Unicode and ANSI structures.
DWORD JobId;
DWORD NextJobId;
DWORD Reserved;
} JOB_INFO_3, *PJOB_INFO_3;
Members
JobId
Print job identifier.
NextJobId
Print job identifier for the next print job in the linked set of print jobs.
Reserved
This value is reserved for future use. You must set it to zero.
http://www.pinvoke.net/
请问这是为什么呢?是不是JOB_INFO_1和JOB_INFO_2获取不了了,如果我暂停/停止打印的过程中能获取Status为17/21能用中文和咱说说吗?看上边两篇头有点大
你哪句没看明白?全翻译出来有点累,呵呵
http://www.pinvoke.net/index.aspx
有Win32 API的详细资料~~~
看看这篇文章看是否有帮助
http://support.microsoft.com/kb/q160129/
http://unit.cug.edu.cn/wlzx/wlfw/delphi/delphi_5%B1%E0%B3%CC%CA%B5%C0%FD%D3%EB%BC%BC%C7%C9/07.pdf