Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 551947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:26:53+00:00 2026-05-13T11:26:53+00:00

I have a windows network (peer-2-peer) as well as Active Directory and I need

  • 0

I have a windows network (peer-2-peer) as well as Active Directory and I need to log the name of users who send any kind of print to the server.
I want to write a program to log their username and/or their respective IP and I’m familiar with c#.net and c++ but I haven’t found any clue regarding how to solve my problem.

is there any sorts of way to catch their name by the help of WMI or should dirty my hand with APIs(but which API I don’t have any idea)?

regards.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:26:54+00:00Added an answer on May 13, 2026 at 11:26 am

    Those features are exposed under the Spooler API.

    EnumJobs will enumerate all the current jobs for a given printer. It will return a JOB_INFO_1 struct, which includes the username associated with a given print job:

    typedef struct _JOB_INFO_1 {
      DWORD      JobId;
      LPTSTR     pPrinterName;
      LPTSTR     pMachineName;
      LPTSTR     pUserName;
      LPTSTR     pDocument;
      LPTSTR     pDatatype;
      LPTSTR     pStatus;
      DWORD      Status;
      DWORD      Priority;
      DWORD      Position;
      DWORD      TotalPages;
      DWORD      PagesPrinted;
      SYSTEMTIME Submitted;
    }JOB_INFO_1, *PJOB_INFO_1;
    

    If you’d prefer WMI, you can use wmic.exe with the /node switch (or your preferred variation) and the Win32_PrintJob class. Roughly:

    c:\> wmic /node 10.0.0.1 
    wmic> SELECT * FROM Win32_PrintJob
    

    …will return a struct with all the print job information for the selected server. You can filter as you wish with the WHERE clause.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written an AppleScript which when supplied with a Windows network link, will
I have a couple Windows computers on my network that will be running a
I have a network C++ program in Windows that I'd like to test for
On my home network I have an installation of Windows Server 2008 and for
I have SVN running on my main windows development box on my home network.
have not tested on windows. but in ubuntu when u disconnect from the network,
Due to our clients authentication and network topology we have a number of Windows
I have Windows Vista MCML app, and I need to figure out the current
We are working in Windows network (AD in use) We have folder shared by
I have a windows service running that deletes folders from network drive. I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.