Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Hooking Printing? Possible?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Mon Jul 01, 2013 9:02 am    Post subject: Hooking Printing? Possible? Reply with quote

Just thought about that today...
is it possible to hook the printing process?? (so when i print my desired documents, the printer would print other document instead)
I found that there's an api for printers in Gdi32.dll but i don't know if that's the way i suppose to do it because that's not a local printer, but a network printer, so i assume i could hook the local process that sends the documents to be printed...

has any of u ever done that b4?

thanks

_________________
Stylo
Back to top
View user's profile Send private message
Screitor
Cheater
Reputation: 1

Joined: 26 Nov 2012
Posts: 33
Location: Venezuela

PostPosted: Tue Jul 02, 2013 12:41 pm    Post subject: Reply with quote

I saw something like that before.
_________________
Everybody lies.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
logical_operator
How do I cheat?
Reputation: 1

Joined: 17 Jun 2013
Posts: 5

PostPosted: Wed Jul 03, 2013 2:41 pm    Post subject: Reply with quote

As far as I can tell [but I'm no expert], you don't need to hook anything to do this.

You simply just monitor the printer job queue using FindFirstPrinterChangeNotification/FindNextPrinterChangeNotification and then catch any PRINTER_CHANGE_ADD_JOB|PRINTER_CHANGE_WRITE_JOB calls. As far as editing what's to be printing goes?

If I was in your shoes and wanted a simple solution, I'd cancel the current job and just create another one with your data. It seems to be a bit of a hassle to grab what's about to be printed and then modify it.
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Fri Jul 19, 2013 2:41 pm    Post subject: Reply with quote

logical_operator wrote:
As far as I can tell [but I'm no expert], you don't need to hook anything to do this.

You simply just monitor the printer job queue using FindFirstPrinterChangeNotification/FindNextPrinterChangeNotification and then catch any PRINTER_CHANGE_ADD_JOB|PRINTER_CHANGE_WRITE_JOB calls. As far as editing what's to be printing goes?

If I was in your shoes and wanted a simple solution, I'd cancel the current job and just create another one with your data. It seems to be a bit of a hassle to grab what's about to be printed and then modify it.

awesome Smile
never heard about that api b4.
btw is there a way to know or enumerate all the jobs id's that the printer is holding at the moment?
my goal is to cancel the printing process when my process detects that a new job is sent to the printer.

_________________
Stylo
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites