打印问题?(100分)

  • 主题发起人 casualrain
  • 开始时间
C

casualrain

Unregistered / Unconfirmed
GUEST, unregistred user!
请问:
如何用API把打印缓冲里的打印任务删除?
用SetAbortProc(PrinterHandle,AbortProc),可是不知怎么编写AbortProc!
用SetJob和AddJob,可是试不出来!
请教高手,最好能写出代码来,谢谢!
 

function AbortProc(h:HDC;iError:integer):boolean;stdcall;
begin
result:=false;
end;

BOOL CALLBACK AbortProc(
HDC hdc, // handle to device context
int iError // error value
);

Parameters
hdc
Handle to the device context for the print job.
iError
Specifies whether an error has occurred. This parameter is zero if no error has occurred;
it is SP_OUTOFDISK if Print Manager is currently out of disk space and more disk space will become available if the application waits.
Return Values
The callback function should return TRUE to continue the print job or FALSE to cancel the print job.
 
好象不行
SetAbortProc调用不成功,不能删除正在打印的任务
 
顶部