7 775533 Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-15 #1 有谁能给我一个使用FindNextPrinterChangeNotification函数的例子.<br>我已经为他搞了两个星期啦.谢谢,谢谢<br>我用VB6使用这个函数编译通过
D DragonPC_??? Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-15 #2 http://groups.google.com/groups?hl=en&threadm=3ba7b4d0_1%40dnews&rnum=1&prev=/groups%3Fhl%3Den%26q%3DFindNextPrinterChangeNotification%26btnG%3DGoogle%2BSearch%26meta%3Dgroup%253Dborland.public.delphi.*
http://groups.google.com/groups?hl=en&threadm=3ba7b4d0_1%40dnews&rnum=1&prev=/groups%3Fhl%3Den%26q%3DFindNextPrinterChangeNotification%26btnG%3DGoogle%2BSearch%26meta%3Dgroup%253Dborland.public.delphi.*
7 775533 Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-15 #5 第二个参数dwchange是不是一个cardinal类型,我编译时提示类型不一致
7 775533 Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-15 #7 procedure PrinterJ;<br>var<br> LHandle:THandle;<br> LInt,LIntA:Integer;<br> LCardinal,LCardinalA:Cardinal;<br> LLPDWORDA,LLPDWORDB:Cardinal;<br> LPHandle:THandle;<br> LAA,LCC: PRINTER_NOTIFY_OPTIONS;<br> LBB: PRINTER_NOTIFY_INFO;<br> LDDRINTER_NOTIFY_OPTIONS_TYPE;<br>begin<br>If OpenPrinter(PCHAR(FPName),LHandle,nil) = True Then<br> Begin<br> LPHandle:= FindFirstPrinterChangeNotification(LHandle,PRINTER_CHANGE_JOB, 0, nil);<br> If LPHandle = INVALID_HANDLE_VALUE Then<br> Begin<br> ShowMessage('进行打印机监视失败!');<br> End<br> Else<br> Begin<br> While IsAddDoc = False Do<br> Begin<br> LCardinal := WaitForSingleObject(LPHandle, INFINITE);<br> If LCardinal = WAIT_OBJECT_0 Then<br> Begin<br> LAA.Version := 2;<br> LAA.Flags := PRINTER_NOTIFY_OPTIONS_REFRESH;<br> LDD.wType := JOB_NOTIFY_TYPE;<br> LAA.pTypes := @LDD;<br> FindNextPrinterChangeNotification(LPHandle,LCardinalA,@LAA,LBB);?????<br> End<br> Else<br> Begin<br><br> End;<br> End;<br> End;<br> End<br>Else<br> Begin<br> ShowMessage('打开打印机失败!');<br> End;<br>end;<br><br>?????处提示:<br> [Error]...:Types of actual and formal var parameters must be identical<br>我是在一个线程中使用
procedure PrinterJ;<br>var<br> LHandle:THandle;<br> LInt,LIntA:Integer;<br> LCardinal,LCardinalA:Cardinal;<br> LLPDWORDA,LLPDWORDB:Cardinal;<br> LPHandle:THandle;<br> LAA,LCC: PRINTER_NOTIFY_OPTIONS;<br> LBB: PRINTER_NOTIFY_INFO;<br> LDDRINTER_NOTIFY_OPTIONS_TYPE;<br>begin<br>If OpenPrinter(PCHAR(FPName),LHandle,nil) = True Then<br> Begin<br> LPHandle:= FindFirstPrinterChangeNotification(LHandle,PRINTER_CHANGE_JOB, 0, nil);<br> If LPHandle = INVALID_HANDLE_VALUE Then<br> Begin<br> ShowMessage('进行打印机监视失败!');<br> End<br> Else<br> Begin<br> While IsAddDoc = False Do<br> Begin<br> LCardinal := WaitForSingleObject(LPHandle, INFINITE);<br> If LCardinal = WAIT_OBJECT_0 Then<br> Begin<br> LAA.Version := 2;<br> LAA.Flags := PRINTER_NOTIFY_OPTIONS_REFRESH;<br> LDD.wType := JOB_NOTIFY_TYPE;<br> LAA.pTypes := @LDD;<br> FindNextPrinterChangeNotification(LPHandle,LCardinalA,@LAA,LBB);?????<br> End<br> Else<br> Begin<br><br> End;<br> End;<br> End;<br> End<br>Else<br> Begin<br> ShowMessage('打开打印机失败!');<br> End;<br>end;<br><br>?????处提示:<br> [Error]...:Types of actual and formal var parameters must be identical<br>我是在一个线程中使用
P Pipi. Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-15 #11 添加<br>var<br> pLBBPrinterNotifyInfo;<br><br>pLBB:=@LBB;<br>FindNextPrinterChangeNotification(LPHandle,LCardinalA,@LAA,Pointer(pLBB));
添加<br>var<br> pLBBPrinterNotifyInfo;<br><br>pLBB:=@LBB;<br>FindNextPrinterChangeNotification(LPHandle,LCardinalA,@LAA,Pointer(pLBB));
7 775533 Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-16 #12 Pipi<br>我按照你讲的作了,不对,还是一样的
7 775533 Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-16 #13 Pipi,对不起,你的是对的.我已经使用通过了<br>但是,还想问一个问题,为什么我获得的JOB的页数都是0