0

I am developing a print monitor in c++. But I'm having trouble getting the file SPL. After much research I discovered that I had to insert the path of the folder where you store the .spl files in spoolerDirectory key.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Print\Printers\'printername'\SpoolDirectory = c:\windows\system32\spool\printers

The problem that this change only takes effect after restarting the spool service.

As I am monitoring jobs printing, when I restart the spooler i will lose all my objects.

There is another way to solve my problems? Tanks!

Carey Gregory
  • 6,836
  • 2
  • 26
  • 47
msantiago
  • 346
  • 2
  • 4
  • 14
  • What is the actual problem? You install your app, set the folder in the Registry, restart the service and/or Windows, and then you are monitoring from that point on. – Remy Lebeau Mar 18 '13 at 20:43
  • 1
    The following page contains info about reading the spool data for a given JobId, the naming conventions for SPL files, etc: http://www.undocprint.org/winspool/spool_files – Remy Lebeau Mar 18 '13 at 20:47
  • Exactly what I do. For each queue there is a dedicated monitor. So when a new queue is added the monitor performs all settings for queue. but there when it restarts the service spooler the information from the previous queues are lost – msantiago Mar 18 '13 at 21:02
  • Are you talking about a port monitor or just an application you developed that monitors print jobs? If it's a port monitor, then yes, when the spooler stops your monitor will also be stopped since it runs as a thread under the spooler process. You will need to save information somewhere such as the registry if you want it to persist between restarts of the spooler. – Carey Gregory Mar 19 '13 at 18:17

0 Answers0