Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling PrintManagerInterop.ShowPrintUIForWindowAsync() fails if app is run elevated #3293

Open
DHancock opened this issue Dec 31, 2022 · 0 comments
Labels

Comments

@DHancock
Copy link

DHancock commented Dec 31, 2022

Describe the bug

The following occurs when calling ShowPrintUIForWindowAsync() from an elevated app:

  1. The print dialog is shown initially.
  2. A fraction of a second later it's closed without any user interaction.
  3. Exactly 30 seconds later a COMException is thrown.

The exception is:

Type: System.Runtime.InteropServices.COMException
Message: OLE has sent a request and is waiting for a reply. (0x80010115)

0x80010115 is RPC_S_CALLPENDING
The exception stack trace doesn't provide any extra info.

Steps to reproduce the bug

  1. Download provided MS demo code from https://github.com/marb2000/PrintSample
  2. Update project's WinAppSdk nuget package to the latest
  3. Build and deploy packaged target
  4. Right click app in start menu and select run as administrator
  5. Attempt to print

Expected behavior

No response

Screenshots

No response

NuGet package version

Windows App SDK 1.2.2

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 22H2 (22621, 2022 Update)

IDE

Visual Studio 2022

Additional context

May be similar to the problems that the file pickers have when running elevated #2504

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants