From: Slartybartfast on
I have used the AsyncUI sample in the WDK: winddk\6000\src\print\asyncnotify
as a model for notification from a driver running on Vista x64. This performs
correctly when the print is initiated from a 64-bit application (say the
64-bit version of WordPad). When invoked from a 32-bit application, e.g.
Word, the call to RouterCreatePrintAsyncNotificationChannel fails. The 32-bit
application uses splwow64 as a sort of thunking layer to the 64-bit driver.
It may be significant that the token, in the case of splwow64, is much
reduced in terms of privileges. I've included the tail end of the !token
output from WinDbg:
Privs:
00 0x000000013 SeShutdownPrivilege Attributes -
01 0x000000017 SeChangeNotifyPrivilege Attributes - Enabled
Default
02 0x000000019 SeUndockPrivilege Attributes -
03 0x000000021 SeIncreaseWorkingSetPrivilege Attributes -
04 0x000000022 SeTimeZonePrivilege Attributes -
Auth ID: 0:33d3b5
Impersonation Level: Anonymous
TokenType: Primary

The call to RouterCreatePrintAsyncNotificationChannel appears to fail
because the function it calls, RevertToPrinterSelf, fails. I think it is
expecting a inpersonation token.

Can anyone suggect a solution.

Regards

Tony