Re: spool file name

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



thank you

i don't know how to make a print processor or a print monitor (or i don't
understa,d your question, my english is bad, lol)

i juste want to intercept print job sent to a specific printer and open the
spool file to change some characters and, in function of what i find in the
file, sending an email or a fax.

"Paul Baker [MVP, Windows - SDK]" <paulb@xxxxxxxxxxxxxxxxxxxxxxx> a écrit
dans le message de news: eJxc%23FRqHHA.4536@xxxxxxxxxxxxxxxxxxxxxxx
Your welcome. So then your application would have to be running on the
print server in this case.

What do you think about making it a print processor or print monitor?

Paul

"Chtiot" <mroos@xxxxxxxxxxxxxxx> wrote in message
news:%230afVCMqHHA.1148@xxxxxxxxxxxxxxxxxxxxxxx
thank you, i will try this

for the network printer, the spool in on the spool directory of the print
server

"Paul Baker [MVP, Windows - SDK]" <paulb@xxxxxxxxxxxxxxxxxxxxxxx> a écrit
dans le message de news: uMJvMCFqHHA.1144@xxxxxxxxxxxxxxxxxxxxxxx
It doesn't look like it is returned in any of the JOB_INFO_* structures
returned by EnumJobs or GetJob.

I see a GetSpoolFileHandle function added in Windows Vista:
http://msdn2.microsoft.com/en-us/library/aa964993.aspx

Perhaps you can pass this handle to GetFileInformationByHandleEx, also
added in Windows Vista:
http://msdn2.microsoft.com/en-us/library/aa364953.aspx

If it is a network printer, is the spool file on the print server?

Maybe this should be handled through a custom print processor or print
monitor?

Paul

"Chtiot" <mroos@xxxxxxxxxxxxxxx> wrote in message
news:%23$bMNyEqHHA.3660@xxxxxxxxxxxxxxxxxxxxxxx
Hello,


I'm not sure to be in the good forum, but i will ask my question :

- i'm using findfirstprinterchangenotification to know when something
is sent to a particular printer (no problem)
- when something is sent to this printer, i list the jobs with enumjobs
(no problem)

When a job is sent to this printer, i open the spool file an do some
operations on the file (generate a pdf, send an email ...).

I have no problem when the printer is a local printer with enhanced
functionalities not actived (the spool file name is equal to the idJob
with extension .spl -> 00027.spl for the job with idjob 27 found with
enumjobs).

But when the printer in a network printer, the name of the spool file
is very different (FP + a number different od idJob found with enumjobs
+ extension .spl -> for example, idJob = 27 -> spool file name is
FP004251.spl).

Is there a way to find the name of the spool file by programation,
using an api ?


thanks

Michel










.



Relevant Pages

  • Re: spool file name
    ... The print spooler is designed to be built from components that can be ... I have not written a print processor or print monitor myself, ... If it is a network printer, is the spool file on the print server? ...
    (microsoft.public.windowsxp.print_fax)
  • Re: Print Processor: Determining Spool File Name (XP/2K)
    ... Your print processor architecture is broken because it relies so much on the ... have access to the spool file name. ... Windows XP, and I am trying to get it working. ... search for the matching file in the spool file directory. ...
    (microsoft.public.development.device.drivers)
  • Re: Print Processor: Determining Spool File Name (XP/2K)
    ... Your print processor architecture is broken because it relies so much on the ... have access to the spool file name. ... > I have a print processor that worked great in Windows 2000, but broke in Windows XP, and I am trying to get it working. ... > I thought perhaps I could use the spool file handle returned by GdiGetSpoolFileHandlealong with GetFileInformationByHandleto find unique information about the file and search for the matching file in the spool file directory. ...
    (microsoft.public.development.device.drivers)
  • Re: spool file name
    ... returned by EnumJobs or GetJob. ... I see a GetSpoolFileHandle function added in Windows Vista: ... Perhaps you can pass this handle to GetFileInformationByHandleEx, ... When a job is sent to this printer, i open the spool file an do some ...
    (microsoft.public.windowsxp.print_fax)
  • Re: spool file name
    ... returned by EnumJobs or GetJob. ... I see a GetSpoolFileHandle function added in Windows Vista: ... When a job is sent to this printer, i open the spool file an do some ...
    (microsoft.public.windowsxp.print_fax)