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:

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

and

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:

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)
c windows winapi printing ipp-protocol
Uwe keim
source share