谁给我讲讲
Declare Function SetJob Lib "winspool.drv" Alias "SetJobA" (ByVal hPrinter As Long, ByVal JobId As Long, ByVal Level As Long, pJob As Byte, ByVal Command As Long) As Long
中的第三个参数和第四个参数怎么设置???
...全文
3115打赏收藏
SetJob函数的用法
谁给我讲讲 Declare Function SetJob Lib "winspool.drv" Alias "SetJobA" (ByVal hPrinter As Long, ByVal JobId As Long, ByVal Level As Long, pJob As Byte, ByVal Command As Long) As Long 中的第三个参数和第四个参数怎么设置???
=============================================
pJob
[in] Pointer to a JOB_INFO_1 or JOB_INFO_2 structure. The function uses this structure to set print job parameters.
Windows NT/2000/XP: pJob can also point to a JOB_INFO_3 structure.
If the Level parameter is 0, pJob should be NULL.
If the Level parameter is 1, pJob should point to a JOB_INFO_1 structure. If the Level parameter is 2, pJob should point to a JOB_INFO_2 structure.
Windows NT/2000/XP: If the Level parameter is 3, pJob should point to a JOB_INFO_3 structure. You must have JOB_ACCESS_ADMINISTER access permission for the jobs specified by the JobId and NextJobId members of the JOB_INFO_3 structure.
Windows 95/98/Me: The function pays attention to this parameter only if the Command parameter is 0. If Command is nonzero, the function ignores this parameter and the Level parameter.
Command
[in] Specifies the print job operation to perform. This parameter can be one of the following values. Value Meaning
JOB_CONTROL_CANCEL Windows 95/98/Me, Windows NT 3.51 and earlier: Delete the print job.
Windows NT 4.0 and later: Do not use. To delete a print job, use JOB_CONTROL_DELETE.
JOB_CONTROL_PAUSE Pause the print job.
JOB_CONTROL_RESTART Restart the print job. A job can only be restarted if it was printing.
JOB_CONTROL_RESUME Resume a paused print job.
JOB_CONTROL_DELETE Windows NT 4.0 and later: Delete the print job.
JOB_CONTROL_SENT_TO_PRINTER Windows NT 4.0 and later: Used by port monitors to end the print job.
JOB_CONTROL_LAST_PAGE_EJECTED Windows NT 4.0 and later: Used by language monitors to end the print job.
Windows 95/98/Me: If you are using the SetJob function to set print job parameters, you must set the Command parameter to 0.
Windows NT/2000/XP: You can use the same call to the SetJob function to set print job parameters and to give a command to a print job. Thus, Command does not need to be 0 if you are setting print job parameters, although it can be.