Menu

Application Verifier break message

Attempt to use a closed printer change notification handle

Probable cause

A printer change notification handle was used after it had been closed.

A printer change notification handle is the handle to an object that is returned by the FindFirstPrinterChangeNotification function and used to signal a program when the status of a printer has changed. After this handle has been closed, it can no longer be used by the program.

Troubleshooting steps

The sample debugger output below illustrates the following troubleshooting steps:

  • To see the routine that tried to use the closed printer change notification handle, dump the current stack trace by using the �k' command in the debugger.

  • To dump the stack trace of the routine that closed the handle, use the dps command with the second parameter of the stop.

After you identify the routine that closed the handle, review the source code to determine why the handle was used after it was closed in the routine identified in the previous step and make the corrections that are necessary to prevent this.

Copy Code
=======================================
VERIFIER STOP 0000A007 : pid 0x1484: Attempt to use a closed printer change notification handle

        00000364 : Printer change notification handle being accessed.
        02EDFF48 : Stack trace of the closing. Use dps to dump the stack trace if it is not NULL.
        00000000 : Not used.
        00000000 : Not used.
=======================================

0:000> k
ChildEBP RetAddr
0026f3b0 7332385b ntdll!DbgBreakPoint
0026f5b4 71366431 vrfcore!VerifierStopMessageEx+0x4bd
0026f5ec 7136839d vfprint!CResourceUsageMgr<void *,CHandleTracker_t<void *> >::ClosedHandleCheck+0x77
0026f690 00143327 vfprint!VfHookFindClosePrinterChangeNotification+0x111
0026f6a4 00142edc UnitTestvfPrint!UseChangeNotificationHandleAfterClose+0x37 * The routine that tried to use the closed printer change notification handle

0:000> dps 02EDFF48
02edff48  7137cc12 vfprint!CaptureStack+0x17
02edff4c  713682da vfprint!VfHookFindClosePrinterChangeNotification+0x4e
02edff50  0014331e UnitTestvfPrint!UseChangeNotificationHandleAfterClose+0x2e * The routine that closed the printer change notification handle

Information displayed by Application Verifier

Parameter 1�-�Printer change notification handle being accessed.

Parameter 2�-�Stack trace of the closing. Use dps to dump the stack trace if it is not NULL.

Parameter 3�-�Not used.

Parameter 4�-�Not used.

Additional information

Test Layer:�PrintAPI

Stop code:�0000A007

Severity:�Error

One-time error:�no

Error report:�Break

Log to file:�yes

Create backtrace:�yes