OpenPrinterW fails with RPC error 1726 in x86 app when WPP is enabled after spooler restart

lam nguyen 5 Reputation points
2026-07-24T03:53:29.1433333+00:00

I found a reproducible issue where OpenPrinterW fails only in the x86 client path on x64 Windows when Windows Print Protected Mode (WPP) is enabled.

Key behavior: the x86 failure disappears after a full reboot, but reappears after restarting the Print Spooler service.

Environment:

  • OS: Windows x64

API: OpenPrinterW

Test printer: Microsoft Print to PDF

App builds tested: x86 and x64 (same source)

WPP states tested: ON and OFF

Repro Steps

Build and run a minimal OpenPrinterW test app.

Set printer name to Microsoft Print to PDF.

Enable WPP.

Restart the Print Spooler service.

Run x86 build, then x64 build.

Reboot the PC and run x86 build again.

Restart spooler again and rerun x86 build.

Observed Results:

WPP OFF: x64 = OK, x86 = OK

WPP ON: x64 = OK, x86 = Error 1726

WPP ON + spooler restart: x64 = OK, x86 = Error 1726

WPP ON + full reboot: x64 = OK, x86 = OK (failure clears)

After reboot, if spooler is restarted again: x86 = Error 1726 (failure returns)

Expected Result:

OpenPrinterW should behave consistently across x86/x64 for Microsoft Print to PDF, including after spooler restart.

Actual Result:

In x86 only, OpenPrinterW fails with GetLastError() = 1726 (RPC_S_CALL_FAILED) when WPP is enabled.

A full reboot temporarily clears the issue, but restarting spooler reproduces it again.

Impact:

This issue causes unstable runtime behavior in my x86 application when using Winspool APIs under WPP, particularly in environments where restarting the Print Spooler is part of routine operations or maintenance.

Request:

Could you please provide any recommended actions or mitigation steps we can implement in our application to handle this condition?

  • Is this a known issue in Windows/Print Spooler, or is it related to winspool.drv (Winspool)?
  • Is there an official workaround?
Windows development | Windows API - Win32
0 comments No comments

1 answer

Sort by: Most helpful
  1. Nancy Vo (WICLOUD CORPORATION) 7,985 Reputation points Microsoft External Staff Moderator
    2026-07-24T10:31:20.64+00:00

    Hello @lam nguyen ,

    Thanks for your question.

    I tested the OpenPrinterW function using a 32-bit (x86) application with Windows Protected Print (WPP) enabled. After restarting the Print Spooler, the test was successful and did not return Error 1726 in my environment.

    My test was conducted on Windows version 10.0.26200.8655. It is possible that this issue is specific to a different Windows build or a specific system configuration.

    User's image

    User's image

    User's image

    Could you please provide the exact Windows version and OS build number you are currently using? Additionally, please confirm if there are any special group policies, enterprise restrictions, or third-party security software applied to your machine.

    You can find official instructions on how to check your exact Windows version here: Find information about your Windows device.

    I hope this addresses your question. If this response was helpful, please consider following the guidance to provide feedback. Thank you.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.