Página 1 de 1
Cancelar a Impressão feita por PrintFileRaw
Enviado: 09 Dez 2010 12:28
por asimoes
Senhores,
Existe alguma função para cancelar a impressão iniciada pela função PrintFileRaw?
Ou cancelar a impressão da lista de documentos que estão sendo impressos?
[]´s
Re: Cancelar a Impressão feita por PrintFileRaw
Enviado: 16 Dez 2010 16:07
por sygecom
É uma Gambi, mas pode fazer assim:
Código: Selecionar todos
FUNCTION LIMPA_SPOOLER
LOCAL nHandle, arq:="temp.bat"
FERASE(arq)
arqh=fcreate(arq,0)
if !arqh>0
Return
ENDIF
FCLOSE(aRQH)
nHandle=FOPEN(arq,2)
FWRITE(nHandle,"net stop spooler" + HB_OsNewLine())
FWRITE(nHandle,"cd %systemroot%\system32\spool\PRINTERS" + HB_OsNewLine())
FWRITE(nHandle,"del /f /s *.shd" + HB_OsNewLine())
FWRITE(nHandle,"del /f /s *.spl" + HB_OsNewLine())
FWRITE(nHandle,"net start spooler" + HB_OsNewLine())
FCLOSE(nHandle)
MYRUN(arq) // executa o .BAT
RETURN