Discussion:
Get username from printmonitor
(too old to reply)
Brad
2010-08-19 02:01:48 UTC
Permalink
Hi All,

I have developed a print monitor, that seems to be working correctly.

How can I get the username of the person that has printed the document?

The StartDocPort function passes a DOC_INFO_1/2/3 structure, but this only
has document name.

Must I query the spooler? How? Document name may not be unique.
Roberto Agostino
2010-08-22 18:44:17 UTC
Permalink
I was searching for the same answer about a log of a net-printer of HP. The
request was how can I go back up the sender of a printer-job, when the
printer and the users are in the same intranet ?

Thank for any answer.

Rob
Post by Brad
Hi All,
I have developed a print monitor, that seems to be working correctly.
How can I get the username of the person that has printed the document?
The StartDocPort function passes a DOC_INFO_1/2/3 structure, but this only
has document name.
Must I query the spooler? How? Document name may not be unique.
Brad
2010-08-23 00:49:17 UTC
Permalink
I was having a bit of a blonde moment, the StartDocPort does pass JobID too.

Which I can then use with GetJob to retrieve a JOB_INFO_1(or 2) which has
the Username in it.
Post by Brad
Hi All,
I have developed a print monitor, that seems to be working correctly.
How can I get the username of the person that has printed the document?
The StartDocPort function passes a DOC_INFO_1/2/3 structure, but this only
has document name.
Must I query the spooler? How? Document name may not be unique.
Loading...