XPSDrv Best practices using Print Verifier

Slides:



Advertisements
Similar presentations
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Windows 8 (1) (2) (3) Windows 8 (1) (2) (3)
Feature: Identity Management - Login © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Reprint Outstanding Transactions Report © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Purchase Requisitions - Requester © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Feature: Payroll and HR Enhancements © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Co- location Mass Market Managed Hosting ISV Hosting.
Print Driver Testing Tools Ashwin Needamangala Senior Test Development Lead Documents and Printing Team
Windows 7 Training Microsoft Confidential. Windows ® 7 Compatibility Version Checking.
Print Verifier Ashwin Needamangala Senior Test Development Lead Documents and Printing Team
Feature: Purchase Order Prepayments II © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Announcing Demo Announcing.
Feature: OLE Notes Migration Utility
Feature: Web Client Keyboard Shortcuts © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Feature: SmartList Usability Enhancements © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
 Rico Mariani Architect Microsoft Corporation.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Windows 8 (1) (2) (3) Windows 8 (1) (2) (3)
WinHEC /22/2017 © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Print Remaining Documents © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Connect with life Connect with life
NEXT: Overview – Sharing skills & code.
demo Receive Inventory Export Parse and Normalize.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Document Attachment –Replace OLE Notes © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Suggested Item Enhancements – Sales Script and Additional Information © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows.
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Feature: Employee Self Service Timecard Entry © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
announcing Dev Manager Do I understand what we’ve built? Developer Can I bet on using this shared component? Testers What’s changed since I last.
Ian Ellison-Taylor General Manager Microsoft Corporation PC27.
3rd Party Connection Manager User Mode Kernel Mode Mobile Broadband Driver Model Command Line Interface Command Line Interface Mobile Broadband.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
demo Instance AInstance B Read “7” Write “8”

customer.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo Demo.
Feature: Void Historical/Open Transaction Updates © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
Feature: Suggested Item Enhancements – Analysis and Assignment © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and.
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
The CLR CoreCLRCoreCLR © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

IoCompleteRequest (Irp);... p = NULL; …f(p);
Возможности Excel 2010, о которых следует знать
Title of Presentation 11/22/2018 3:34 PM
Managing and Troubleshooting Exchange Server Delivery
Title of Presentation 12/2/2018 3:48 PM
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
Title of Presentation 5/12/ :53 PM
Шитманов Дархан Қаражанұлы Тарих пәнінің
Title of Presentation 5/24/2019 1:26 PM
日本初公開!? Vista の新機能を実演 とっちゃん わんくま同盟 7/23/2019 9:09 AM
Title of Presentation 7/24/2019 8:53 PM
Presentation transcript:

XPSDrv Best practices using Print Verifier 4/20/2017 2:08 AM XPSDrv Best practices using Print Verifier Manski Fransazov Test Development Lead Microsoft Corporation Ashwin Needamangala © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Agenda Introduction to Print Verifier Using Print Verifier Setup and Configuration Usage Recommendations Demonstration Advanced Features Print Verifier Fault Detection Future Directions Call to Action

App/Driver Quality Challenges Print problems difficult to troubleshoot No print subsystem resource tracking Leaking print resources Using print resources in unsafe manner No print-specific tools allowing extended runtime checks Contracts between XPS filter and the Operating System (OS) Contracts between GDI driver and the OS Contracts between applications and the OS

Introduction To Print Verifier Designed to address many of the challenges Runtime verification tool Implemented as a DLL, injected early in each process Designed to catch violators in the act Flags errors via debugger breaks Supports both XPSDrv and GDI drivers Works per process Hooks the interfaces between 3rd party code and OS code Ships as part of Application Verifier Available on microsoft.com Well documented

High Level Architecture 4/20/2017 2:08 AM High Level Architecture Applications Provided by: Microsoft Print Verifier (PrintAPI layer) ISV Spooler APIs IHV OEM Core Print Driver (unidrv, pscript, XPSDrv) Print Verifier (PrintDriver layer) Plug-in/XPSDrv Filter © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 5

Print Verifier Philosophy 100% certainty when issuing a stop When in doubt, don’t stop in the debugger Print Verifier design is suitable for Windows Logo tests Under consideration for a future Windows Logo requirement

Using Print Verifier Typical Workflow Install and enable Print Verifier for a process (say PrintFilterPipelineSvc.exe) Restart the process and start testing App/driver violates an invariant at runtime Say, over-releases an XPS filter interface pointer, or uses invalid print ticket, etc Print Verifier immediately issues a debugger break (“verifier stop”) Look up the documentation for the stop code and identify the bug

Setup And Configuration Part of Application Verifier MSI package Easy, scriptable, and configurable install Once installed, can be enabled for each desired process For all verified processes the presence of a debugger is required Known limitations System processes (csrss, lsass) not supported Application and Print Verifiers designed to verify native applications, not .NET applications It works, but provides limited value

Setup And Configuration

Recommended Settings If you are a driver developer or tester Enable Basics, Print Driver, and Print API layers for Spoolsv.exe (core print spooler service) PrintFilterPipelineSvc.exe (filter pipeline process) Splwow64.exe (thunk process for WoW64 printing) All test .EXEs you have

Recommended Settings If you are an ISV developer or tester Enable Basics and Print API layers for Your ISV application All test .EXEs you have

demo PrintVerifier Demo 4/20/2017 2:08 AM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 12

Additional Features Individual layers under “Printing” can be disabled Individual stops can be downgraded or disabled Print Ticket verification (PTConform) can be turned off All of the above available from both App Verifier UI as well as command line

Additional Features Fault injection Logging Available in both PrintAPI and PrintDriver layers FaultRate property controls rate of fault injection Logging Log is generated when a stop occurs during the verification of an application or driver Command line support to export logs to XML AppVerifier UI has a link to Log Viewer

Print Verifier Fault Detection Print resource tracking Printer handles, printer change notification handles, PRINTER_NOTIFY_INFO, spool file handles, HPTPROVIDER handles Will issue a stop if the verified code is Leaking any of the above print resources Using already closed handles Using unknown/un-initialized handles Using handles in a thread-unsafe manner

Print Verifier Fault Detection Invalid PrintTicket or PrintCapabilities objects crossing interface boundaries Application passing bad PrintTicket Driver/filter returning bad PrintTicket Incorrect interface reference counting XPS filters, plug-ins XPS filter making illegal call to the pipeline Example: Two IPrintWriteStream::Close calls

Print Verifier Fault Detection XPS filter changing/removing common property from the property bag XPS filter calling pipeline interface out of order Drivers/Filters causing structured exceptions Access violations Integer divide-by-zero Invalid OS handle usage Changing the security context in plug-in Bad DEVMODE buffer passed Illegal API call made in DllMain

Future Improvements Considering support for XPS conformance at runtime 4/20/2017 2:08 AM Future Improvements Considering support for XPS conformance at runtime Asynchronous notifications Rendering and UI COM interfaces Stricter return value/GetLastError checks Non-driver components Print processors, port monitors, language monitors, etc Monolithic driver verification © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Call To Action Get familiar with Application Verifier and Print Verifier Try out Print Verifier against your XPSDrv filters and GDI mini-drivers Integrate Print Verifier in your development and test environments Visit the Print Verifier blog Post questions to Print Verifier newsgroup Feature requests more than welcome!

Related Sessions Chalk Talk: Print Verifier and XPSDrv Driver Development Chalk Talk: XPS Document Optimization and Best Practices Technical Session: Performance Optimization for XPS Documents XPSDrv Lab: How to Develop and Test Print Drivers and Filters

Additional Resources Blog: http://blogs.msdn.com/PrintVerifier Newsgroup: Microsoft.public.win32.programmer.tools on www.msdn.com Email: Download AppVerifier: http://www.microsoft.com/downloads/details.aspx?FamilyID=bd02c19c- 1250-433c-8c1b-2619bd93b3a2&DisplayLang=en AppVerifier: http://msdn2.microsoft.com/en- us/library/aa480483.aspx WHDC for Print Devices: http://www.microsoft.com/whdc/device/print/default.mspx XPS: http://www.microsoft.com/xps xpsinfo@microsoft.com prninfo@microsoft.com

© 2007 Microsoft Corporation. All rights reserved © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.