Capturing print obs

Hi

Using Windows 2K/XP with MFC / VC6 - I am trying to capture a print job of an application that I DO NOT have source code to, nor do I know what print method it is using, here are the steps (I think) I need to do - all related to a locally attached printer (could be serial or parallel)

  1. Get notified inside my application of a print job initiated
  2. Stop the print spooler / halt the printer
  3. Obtain the SPL file from windows\system32 etc…
  4. Add something to the top of the job - eg: a bitmap / logo or some text
  5. Add something to the end of the page, eg: some more text…
  6. Save the modified SPL file back to its original location
  7. Release the spooler
  8. Let the printer print…

Hope someone can help me with some code samples

Thanks
Alex