大网数据广告活动
打印与设备

How To: Use Application Isolation

· 52CE 我爱测

Apps can declare printer-driver isolation in their app manifest to isolate the app from the printer driver and improve the apps reliability.

Apps can declare printer-driver isolation in their app manifest to isolate the app from the printer driver and improve the app's reliability. The Windows print service allows printer drivers to run in processes that are separate from the process in which the print spooler runs. Using this feature your app prevents it from crashing in the event the printer driver has an error.

Printer-driver isolation is implemented in Windows 7 and Windows Server 2008 R2.

Prerequisites

  • A managed-code or Windows Store app that uses Windows printing.

Instructions

Update the app manifest

Enabling printer-driver isolation requires you to add the printerDriverIsolation element to the app's manifest. Here's how:

  1. Edit the app manifest, adding the printerDriverIsolation element with a value of true to the windowsSettings element of the application element, as shown in this example.

    <application xmlns="urn:schemas-microsoft-com:asm.v3">
        <windowsSettings>
            <printerDriverIsolation xmlns="http://schemas.microsoft.com/SMI/2011/WindowsSettings">true</printerDriverIsolation>
        </windowsSettings>
    </application>
    
  2. Rebuild your app.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。