阅读:1479回复:1
开发打印机时,如何才能得到当前打印的文件名办法OEMStartDoc( SURFOBJ *pso, PWSTR pwszDocName, DWORD dwJobId ) { .... PDEVOBJ pdevobj=(PDEVOBJ)pso->dhpdev; .... JOB_INFO_1 *pJobinfo; DWORD tt,nwriten; UCHAR docname[256]; ....... GetJob(pdevobj->hPrinter,dwJobId,1,pJobinfo,tt,nwriten); ...... WideCharToMutiByte(cp_acp,0,pJobinfo->pDocment,-1,docname,256,NULL,NULL); .... } 注意GetJob函数的使用方法,看ddk. 应先看需要多大内存,再给pJobinfo申请内存 |
|
|
沙发#
发布于:2005-02-05 16:11
谢谢
|
|