I'm trying to create a version 3 virtual printer driver, which uses the XPS filter pipeline to convert the XPS spool file into another PDL and save it to disk.
I'm fine with the conversion side of things (using a pipeline filter), but when it comes to presenting the user with a dialog to select a path to save to, I'm not sure what's best!
I know that when I assign my virtual printer to the 'Print to File' port (FILE:), the spooler will show a default save dialogue before the job hits the print queue, like below on windows 7:
Only problem is that the default is just a bit too basic. Is there any way to override this default save dialogue for my specific printer driver and provide my own full save dialog?
Thanks a lot!
Andy
Update for the benefit of the comments
This is the call stack of the main thread in Notepad when printing to the Adobe PDF printer and at the stage where the save dialog is showing. I guess my interpretation of this call stack is that there isn't port monitor library involved at the stage when the save dialog is shown. Is my interpretation correct? If so, the question still remains, what's showing the custom save dialog in the Adobe PDF Printer?
ntdll.dll!NtWaitForMultipleObjects+0xa
KERNELBASE.dll!GetCurrentThread+0x36
kernel32.dll!WaitForMultipleObjectsEx+0xb3
USER32.dll!PeekMessageW+0x1cd
DUser.dll+0x14e6
DUser.dll+0x15ef
DUser.dll+0x1565
USER32.dll!TranslateAcceleratorW+0x5e
ntdll.dll!KiUserCallbackDispatcher+0x1f
USER32.dll!WaitMessage+0xa
USER32.dll!MapDialogRect+0x234
USER32.dll!MapDialogRect+0x4c5
USER32.dll!DialogBoxIndirectParamAorW+0x56
USER32.dll!DialogBoxIndirectParamW+0x18
COMDLG32.dll!DllCanUnloadNow+0x590
COMDLG32.dll!Ordinal100+0xb620
COMDLG32.dll!Ordinal100+0xb53f
COMDLG32.dll!Ordinal100+0xb45d
COMDLG32.dll!Ordinal100+0xb31e
COMDLG32.dll!Ordinal100+0xb239
ADUIGP.DLL!DllCanUnloadNow+0x51e
ADUIGP.DLL!DllGetClassObject+0xeef
ADUIGP.DLL!DllCanUnloadNow+0x1441
PS5UI.DLL!DrvDocumentEvent+0xef
WINSPOOL.DRV!Ordinal100+0x20b
WINSPOOL.DRV!DeletePortW+0x2d0
WINSPOOL.DRV!DocumentEvent+0x213
GDI32.dll!ExtFloodFill+0x16b
GDI32.dll!StartDocW+0x58b
notepad.exe+0xa24c
notepad.exe+0x7701
notepad.exe+0x23e8
notepad.exe+0x14eb
USER32.dll!GetSystemMetrics+0x2b1
USER32.dll!GetSystemMetrics+0x4fa
notepad.exe+0x10bc
notepad.exe+0x133c
kernel32.dll!BaseThreadInitThunk+0xd
ntdll.dll!RtlUserThreadStart+0x21