Getting the real user who printed the document on an IPP printer

I am currently trying to programmatically retrieve the name of the user who started the print job on the displayed IPP printer .

I am struggling with the fact that the JOB_INFO_2 structure member pUserName contains the username that is used to connect to the IPP printer, and not to the user who launched the print job locally.

To illustrate:

enter image description here

Looking at both, the Microsoft PrintMon tool and the printer queue, they both show the same thing:

enter image description here

and

enter image description here

They show "uwe_keim" as the user who owns it, although another user has started the print job.

This is similar to the credentials of the user used to authenticate with the IPP printer:

enter image description here

I really don’t understand how / is it possible to get the actual user who started the print job (I need this for an application running in a multi-user terminal environment).

So, to summarize my question:

How to get the name of the user who started the print job? (unlike the name of the user who owns the print job)

+8
c windows winapi printing ipp-protocol
source share
1 answer

Check the pNotifyName field

0
source share

All Articles