enumjobs
所属分类:打印编程
开发工具:PowerBuilder
文件大小:16KB
下载次数:8
上传日期:2009-05-26 18:47:39
上 传 者:
torpedator
说明: Control printer jobs
文件列表:
enumprintjobs.pbl (66048, 2005-01-20)
This demonstrates how to call the EnumJobs Windows API function. It also involves the use
of the following API functions:
OpenPrinter
ClosePrinter
RtlMoveMemory
lstrlen
lstrcpy
The RtlMoveMemory function is used to copy the data from a blob used as a buffer to the actual structure. Since the JOB_INFO_1 structure contains pointers to strings, the lstrlen and lstrcpy functions are used to get the strings those pointers refer to.
Rather than calling EnumJob once for all jobs, the routine loops and calls EnumJob one for each job. That's because the size of the buffer varies between jobs, and there's no good way in PB to determine the size for each job if all of the jobs are returned in a single call.
bruce.armstrong@teamsybase.com
近期下载者:
相关文件:
收藏者: