?
Solved

Printing result ?

Posted on 1997-10-14
3
Medium Priority
?
277 Views
Last Modified: 2010-04-04
We would like to know, when we send a file to the printer, if the file was printed.

Is there a (Windows API/Delphi) function who can give the print-result back to our program ?

Jan.
0
Comment
Question by:JanDidden
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Expert Comment

by:mirek071497
ID: 1347489
I Think so no, because You can only get information if the job was sended to PrintManager. I don't know any way to get information from PrintManager about his jobs, but you can try with dde or other method.
0
 
LVL 3

Accepted Solution

by:
Pegasus100397 earned 100 total points
ID: 1347490
Jan,

Unfortunately I don't think there is a function to determine if the file has been printed. Your program would only be able to determine when the file was cleared from the print queue.

An alternative method (although kludgy IMHO) might be to monitor the status of the Printer queue dialog box (the one that comes up when you right-click on the printer icon in the status tray), scan the items contained in it (get the handle of the dialog and scan it's children for the list box containing the print jobs). Your program would, of course,  have to know the name of the report it just printed and "alert itself" when the report name ceased to exist in the print queue (job printed).

Anyways, hope this helps & good luck.
Pegasus
0
 
LVL 3

Expert Comment

by:Pegasus100397
ID: 1347491
Jan,

My previous "Answer" was not quite 100% true. Upon further research I found the Windows API functions for monitoring the status of a print job. Check out online-help for
WM_SPOOLERSTATUS,
JOB_INFO_2 (very good explaination there),
GetJob,
SetJob and EnumJobs

These are messages/API functions that will allow you to monitor the status of your print job. Let me know if these work for you or if you need help writing the functions to interface with the API.

Good luck
Pegasus
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question