Code help to Purge Network/Local Print .
Dim ps = New LocalPrintServer(PrintSystemDesiredAccess.AdministrateServer)
Dim pq = New PrintQueue(ps, ps.DefaultPrintQueue.FullName,
PrintSystemDesiredAccess.AdministratePrinter)
If pq.NumberOfJobs > 0 Then
pq.Purge()
End If
Dim ps = New LocalPrintServer(PrintSystemDesiredAccess.AdministrateServer)
Dim pq = New PrintQueue(ps, ps.DefaultPrintQueue.FullName,
PrintSystemDesiredAccess.AdministratePrinter)
If pq.NumberOfJobs > 0 Then
pq.Purge()
End If
No comments:
Post a Comment
Your feedback is always appreciated. I will try to reply to your queries as soon as time allows.Please don't spam,spam comments will be deleted upon reviews.