Printer Driver Setup and 64-bit Implications. Outline Development Understanding how to write a printer driver for 64-bit systems What’s different and.

Slides:



Advertisements
Similar presentations
Windows Deployment Services WDS for Large Scale Enterprises and Small IT Shops Presented By: Ryan Drown Systems Administrator for Krannert.
Advertisements

Understand Virtualized Clients Windows Operating System Fundamentals LESSON 2.4.
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Inside Printer Setup And Installation For Windows Vista
11 INSTALLING WINDOWS XP Chapter 2. Chapter 2: Installing Windows XP2 INSTALLING WINDOWS XP  Prepare a computer for the installation of Microsoft Windows.
64bit Development Overview March 28 Microsoft. Objectives Learn about the current 64-bit platforms from a hardware, software and tools perspective Review.
1.1 Installing Windows Server 2008 Windows Server 2008 Editions Windows Server 2008 Installation Requirements X64 Installation Considerations Preparing.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 1: Introduction to Windows Server 2003.
CHAPTER Hard Resource (Printer) Sharing. Chapter Objectives Explain the concept of sharing a hard resource Present the step-by-step process of placing.
Hands-On Microsoft Windows Server 2003 Chapter 2 Installing Windows Server 2003, Standard Edition.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 8: Implementing and Managing Printers.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 8: Implementing and Managing Printers.
MCTS Guide to Microsoft Windows Server 2008 Network Infrastructure Configuration Chapter 8 Introduction to Printers in a Windows Server 2008 Network.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 8: Implementing and Managing Printers.
Chapter 8: Network Operating Systems and Windows Server 2003-Based Networking Network+ Guide to Networks Third Edition.
NETOP ONDEMAND What’s new in version 2.1? DECEMBER 09 NETOP ONDEMAND1.
MCTS Guide to Microsoft Windows Server 2008 Network Infrastructure Configuration Chapter 2 Installing Windows Server 2008.
1 Chapter Overview Introduction to Windows XP Professional Printing Setting Up Network Printers Connecting to Network Printers Configuring Network Printers.
WDK Driver Test Manager. Outline HCT and the history of driver testing Problems to solve Goals of the WDK Driver Test Manager (DTM) Automated Deployment.
Distributing Drivers on Windows Update
Advanced Deployment Topics – MSI Enhancements Om Sharma Program Manager, Windows Installer Microsoft Corporation.
VMware vCenter Server Module 4.
Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.
Printing Terminology. Requirements for Network Printing At least one computer to operate as the print server Sufficient RAM to process documents Sufficient.
Winter Consolidated Server Deployment Guide for Hosted Messaging and Collaboration version 3.5 Philippe Maurent Principal Consultant Microsoft.
Debunking the Top 10 Myths of Small Business Server: Using Windows SBS in Larger Environments Abstract: This session will debunk some of the common myths.
Richard Smith Senior Consultant – Management, Operations and Deployment Microsoft UK Simple Deployments with Windows AIK and Windows DS.
New Document Lifecycle Opportunities N. Gregg Brown Lead Program Manager Digital Documents microsoft.com Microsoft Corporation.
Hands-On Microsoft Windows Server 2008 Chapter 1 Introduction to Windows Server 2008.
DB2 (Express C Edition) Installation and Using a Database
A+ Guide to Managing and Maintaining Your PC Fifth Edition Chapter 15 Installing and Using Windows XP Professional.
Module 1 Additional Slides Introducing Windows XP Professional.
Debugging Print And Imaging Drivers. Print driver team philosophy on driver quality There are tools to detect violations Wrongful development assumptions.

A+ Guide to Managing and Maintaining Your PC Fifth Edition Chapter 15 Installing and Using Windows XP Professional.
©Kwan Sai Kit, All Rights Reserved Windows Small Business Server 2003 Features.
OFC 200 Microsoft Solution Accelerator for Intranets Scott Fynn Microsoft Consulting Services National Practices.
Advances in Windows Printing Daniel Emerson Program Manager Digital Documents Platform and Solutions Microsoft Corporation.
Kyocera Driver Installation Basic instruction to add a printer to computer using standard defaults.
Chapter Fourteen Windows XP Professional Fault Tolerance.
Explain the purpose of an operating system
Installing Windows Vista Lesson 2. Skills Matrix Technology SkillObjective DomainObjective # Performing a Clean Installation Set up Windows Vista as the.
Windows ® XP 64-Bit Edition Your Name Your Title Microsoft Corporation.
CMPF124:Basics Skills for Knowledge Workers Introduction to Windows OS.
Windows XP to Windows 7 using P2V Migration. Agenda Deploying Local P2V Migration for SA Retro Mode Scripts Customize MDT 2010 with Disk2VHD Windows Virtual.
By Rashid Khan Lesson 10-From Here to There: Remote Installation of the Windows XP Professional Client.
Module 1: Installing and Configuring Servers. Module Overview Installing Windows Server 2008 Managing Server Roles and Features Overview of the Server.
OFC290 Information Rights Management in Microsoft Office 2003 Lauren Antonoff Group Program Manager.
Windows 2000 Course Summary Computing Department, Lancaster University, UK.
1 Introduction to Microsoft Windows 2000 Windows 2000 Overview Windows 2000 Architecture Overview Windows 2000 Directory Services Overview Logging On to.
Designing a Scalable Enterprise Project Management Architecture Ken Toole Platform Test Manager MS Project Microsoft Corporation.
11 WORKING WITH PRINTERS Chapter 10. Chapter 10: WORKING WITH PRINTERS2 TERMINOLOGY PrinterLogical object Print DevicePhysical object Printer DriversSoftware.
Microsoft Virtual Server: Overview and Roadmap Mike Neil Product Unit Manager Windows Virtualization microsoft.com Microsoft Corporation.
Developing a 64-bit Strategy Craig McMurtry Developer Evangelist, Software Vendors Developer and Platform Evangelism Microsoft Corporation.
Hands-On Microsoft Windows Server 2008 Chapter 5 Configuring Windows Server 2008 Printing.
John Samuels October, Why Now?  Vista Problems  New Features  >4GB Memory Support  Experience.
Planning Server Deployments Chapter 1. Server Deployment When planning a server deployment for a large enterprise network, the operating system edition.
9 Copyright © 2004, Oracle. All rights reserved. Getting Started with Oracle Migration Workbench.
Network and Server Basics. Learning Objectives After viewing this presentation, you will be able to: Understand the benefits of a client/server network.
Installing Windows 7 Lesson 2.
Introduction to ASP.NET 2.0
Objectives Differentiate between the different editions of Windows Server 2003 Explain Windows Server 2003 network models and server roles Identify concepts.
Debunking the Top 10 Myths of Small Business Server: Using Windows SBS in Larger Environments Abstract: This session will debunk some of the common myths.
Windows Virtual PC / Hyper-V
Best practices for packaging and distributing device drivers
Service Template Creation from the Ground Up
Service Template Creation from the Ground Up
Introduction to ASP.NET Parts 1 & 2
SBS 2008 – One year on David Overton
Presentation transcript:

Printer Driver Setup and 64-bit Implications

Outline Development Understanding how to write a printer driver for 64-bit systems What’s different and what stays the same Setup Guidance for installing 64-bit drivers and “additional drivers” How to write an INF that installs 64-bit and 32-bit versions of a printer driver

Goals Understand how to develop printer drivers for 64- bit Windows Understand differences in printing in native mode and across the Windows thunking layer Create an INF that installs 32-bit and 64-bit print drivers Identify the changes made in Windows Server 2003 SP1 and Windows XP Professional 64-bit Edition to facilitate cross-platform driver installation

64-bit Printer Driver Development

Overview The Windows Printing Subsystem is at feature parity between x64 and x86 versions of the OS 64-bit drivers are required to print from 64-bit Windows Special cases while printing across the thunking layer Some 64-bit specific INF requirements Line servers, such as File and Print servers are in the sweet spot for the price/performance ratio of the x64 platform Will be a key segment for the future Driver availability is critical to adoption of 64-bit platform

Supported 64-bit Architectures Scalability Breadth of Applications 64-bit IPF Most Scalable Versatile Mainstream 64-bit x64 32-bit x86

x64 Platform Options x64 hardware supports multiple configurations Extends hardware investment by allowing gradual migration to 64-bit computing PC Hardware Device Drivers Windows Edition Applications 32-bit Stack 64-bit Stack Hybrid Stack x64 32-bit x64 x64 x64 32-bit x64 x64 x64 x64 x64

Print Driver Development for 64-bit No special requirements to build printer driver code for x64 If you can write a printer driver for 32-bit, you can write one for 64-bit Follow regular porting guidelines Windows XP Professional x64 Edition ships with thousands of printer drivers Porting to x64 architecture was relatively straightforward Print system components are the same as 32-bit

Coding Guidelines Use Windows 64- and 32-bit safe data types Examine all pointer usage, especially pointer arithmetic Remove inline assembly code (use intrinsics or native assembly code) Use #if defined (__AMD64__) for x64 specific code No __x64__ definition Use #if defined(__IA64__) for Itanium specific code Build environment for x64 is AMD64

Areas for Caution While Developing 64-bit Print Drivers Location of binaries System32 and Syswow64 directories Use Dirids rather than full paths in infs Thunking layer There are some GDI printing callbacks which work differently in the thunking case compared to the native case DrvDocumentEvent Extended escapes

Printing Across the Thunking Layer If you load/run a 32-bit application on the 64-bit platform some calls need to be translated from 32-bit mode to 64-bit mode This translation is called thunking WOW64 is the main Windows 64-bit thunking layer Runs Windows NT x86 binaries No support for mixing of 32-bit and 64-bit code within a process User/kernel transitions are thunked to account for structure differences and transition between instruction sets Only a few dlls are thunked: ntdll.dll, user.dll, gdi.dll are the main ones On 64-bit Windows, GDI is a 64-bit component While printing from a 32-bit application, interactions with GDI are managed by the WOW64 thunking layer

GDI:DrvDocumentEvent Some printer drivers make GDI callbacks from a UI module during printing For example to add a watermark, to do some types of ICM profile matching, to do certain types of run time job accounting Typically made from DrvDocumentEvent Not part of the original design intent of the API This call is made across the thunking layer from application space to driver space GDI must marshall the state of any data across the thunking layer in order to have the data available for the print driver. Problem: the data is essentially unbounded Extremely difficult (trending towards unachievable) to accurately marshall all data

Extended Escapes DrvDocumentEvent calls which use ExtEscapes are supported Enables the majority of call back scenarios y/en-us/graphics/hh/graphics/drvrfnc_ffc39ed1-d1b8- 4e3d-b0a3-515b90cd6c8f.xml.asphttp://msdn.microsoft.com/library/default.asp?url=/librar y/en-us/graphics/hh/graphics/drvrfnc_ffc39ed1-d1b8- 4e3d-b0a3-515b90cd6c8f.xml.asp for details on the available parameters Other uses of DrvDocumentEvent callbacks are not supported in the current release across the thunking layer Several thousand drivers have been tested Very low numbers of functional problems found

Mitigations and Drawbacks Mitigations This entire problem set only affects printing from a 32- bit app on 64-bit Windows, and within that space only affects “advanced” printing features It is possible to work around the limitations by designing the driver differently Use print processor Application level watermarks 64-bit applications do not show these problems Development of x64 applications will minimize the impact of this limitation Drawbacks In some cases more than a simple driver recompile is required to get the same printing experience Value add applications may need to be ported to 64-bit to ensure the same functionality is available

Installing 64-bit Printer Drivers

Introduction We expect mixed 32-bit and 64-bit environments for many years Printing is unique among device classes To support Point & Print, non-native platform printer drivers may be loaded onto a system as “additional drivers” The challenge: How do I write an INF that loads an x64 driver on any platform? How do I write an INF that installs an x86 driver on an x64 platform? The answer: Use INF decorations What’s mandatory, what’s not What works on what versions of Windows

64-bit Drivers How to install x64 and x86 drivers There are no setup differences between AMD64 and Intel EM64T The examples show how to install the x86 and x64 version of a driver from one INF Itanium isn’t covered in the examples in this presentation but the logic Is the same There is more Itanium-specific information in the Driver Development Kit (DDK)

[MANUFACTURER] %Acme Corp.% = Acme, NTamd64 [Acme.NTamd64] %Acme Model% = Acme100PS, [Acme100PS] CopyFiles = DriverFile.DLL [SourceDisksFiles.amd64] Some INF Terminology Manufacturer Section Model Section x64 = NTamd64 DDInstall Section SourceDisksFiles Section

INF Decorations are Required on x64 An x64 driver must use a decorated Model section on the following platforms: Windows Server 2003 SP1 Windows XP Professional x64 Edition …and future versions of Windows The x64 Editions of Windows will not recognize drivers that are not decorated correctly Decorations will be required for Itanium (ia64) drivers on Longhorn So - how do you write an INF that works on Windows Server 2003 SP1/XP x64 and on earlier versions of Windows?

Approach Decorate the Model section to match the processor architecture of the 64-bit driver that you are installing This will install the driver correctly on Windows 2003 SP1 (any platform), Windows XP Professional x64 Edition, and Longhorn Also provide an undecorated Model section This will install the x86 driver It will install a driver correctly on earlier versions of Windows Use decorated SourceDisksFiles to point the installer to the correct location of your binaries

Getting Started – 32-bit Driver [MANUFACTURER] %Acme Corp.% = Acme [Acme] %Acme Model% = Acme100PS, [Acme100PS] CopyFiles = Driver.DLL … The INF Model section below installs an x86 driver on any version of Windows

Getting Started – x64 Driver [MANUFACTURER] %Acme Corp.% = Acme, NTamd64 [Acme.NTamd64] %Acme Model% = Acme100PS, [Acme100PS] CopyFiles = Driver.DLL … The INF Model section below loads an x64 driver on: Windows Server 2003 SP1 (any processor architecture) Windows XP Professional x64 Edition

Supporting More Versions of Windows This also installs the x64 driver on versions of Windows prior to Windows 2003 SP1 and XP x64 [MANUFACTURER] %Acme Corp.% = Acme, NTamd64 [Acme] %Acme Model% = Acme100PS, [Acme.NTamd64] %Acme Model% = Acme100PS, … But: also matches x86 drivers!

Solution with Three Example Usages The following slides show a complete example Separate install scenarios are presented, all using the same INF

Complete Example [MANUFACTURER] %Acme Corp.% = Acme, NTamd64 [Acme] %Acme Model% = Acme100PS, [Acme.NTamd64] %Acme Model% = Acme100PS, [Acme100PS] CopyFiles = MyDriverFile.dll,... [SourceDisksNames.x86] 1= %Location%,,, [SourceDisksFiles.x86] MyDriverFile.dll = 1,\i386 [SourceDisksNames.amd64] 1= %Location%,,, [SourceDisksFiles.amd64] MyDriverFile.dll = 1,\amd64

Install an x64 Driver on Server 2003 SP1/XP x64 [MANUFACTURER] %Acme Corp.% = Acme, NTamd64 [Acme] %Acme Model% = Acme100PS, [Acme.NTamd64] %Acme Model% = Acme100PS, [Acme100PS] CopyFiles = MyDriverFile.dll,... [SourceDisksNames.x86] 1= %Location%,,, [SourceDisksFiles.x86] MyDriverFile.dll = 1,\i386 [SourceDisksNames.amd64] 1= %Location%,,, [SourceDisksFiles.amd64] MyDriverFile.dll = 1,\amd64 Installs an x64 driver on XP x64, and Windows Server 2003 SP1 (any platform, so may be additional driver)

Install an x86 Driver on Server 2003 SP1/XP x64 [MANUFACTURER] %Acme Corp.% = Acme, NTamd64 [Acme] %Acme Model% = Acme100PS, [Acme.NTamd64] %Acme Model% = Acme100PS, [Acme100PS] CopyFiles = MyDriverFile.dll,... [SourceDisksNames.x86] 1= %Location%,,, [SourceDisksFiles.x86] MyDriverFile.dll = 1,\i386 [SourceDisksNames.amd64] 1= %Location%,,, [SourceDisksFiles.amd64] MyDriverFile.dll = 1,\amd64 This section is used when the user installs an x86 driver on XP x64, or Server 2003 SP1 (any platform)

Install an x64 Driver on XP SP2 [MANUFACTURER] %Acme Corp.% = Acme, NTamd64 [Acme] %Acme Model% = Acme100PS, [Acme.NTamd64] %Acme Model% = Acme100PS, [Acme100PS] CopyFiles = MyDriverFile.dll,... [SourceDisksNames.x86] 1= %Location%,,, [SourceDisksFiles.x86] MyDriverFile.dll = 1,\i386 [SourceDisksNames.amd64] 1= %Location%,,, [SourceDisksFiles.amd64] MyDriverFile.dll = 1,\amd64 SourceDisksFiles locates the correct driver files This section is also used to install the x64 driver on XP SP2 as an additional driver

User Experience Changes To make the Driver installation experience more predictable and consistent, we made some changes for Server 2003 SP1 and XP x64 Edition We changed the path through the Add Printer Driver Wizard so that the user can select the platform before the printer model We improved the way in which Unidrv-based printer drivers are installed

Add Printer Driver Wizard Install an x86 driver on an x64 Server Use Have Disk to locate non-native drivers

Unidrv Problem: when installing an x64 Unidrv-based driver on an x86 print server as an additional driver, how do we locate the x64 version of Unidrv? Old solution: use remote admin from machine with matching architecture. But: This requires that you have x64 installed locally No version predictability New solution: Windows prompts for correct Windows media Gives the user control If it’s on a network share this is transparent to the user

Summary of Printer Driver Installation Section INF Model section decorations are now required for x64 drivers They are supported on Itanium and will be required so decorate Itanium drivers too Undecorated model sections are used to install x86 drivers, and also for x64 drivers on earlier versions of Windows So use decorations on the SourceDisksFiles section to distinguish between different driver platforms There are some tweaks in Windows Server 2003 SP1 and XP x64 to improve the overall user experience

Call to Action Use Model section decorations in your INF to describe the target platform for your driver Assess market needs for x64 drivers for your devices Now - CAD / DCC / CAM Future Photo / enthusiast Print servers / enterprise deployment Examine driver and application code for use of GDI:DrvDocumentEvent Plan for workarounds if required Use the Designed for Windows Logo Program to certify 64-bit drivers

Additional Resources Community Sites MSDN Developer Community Chats: Printer Drivers -- Ask the Experts Online Windows Drivers: Printer Drivers Windows Drivers Printing and Networking Web resources WS-Devices Profile: ?pull=/library/en-us/dnglobspec/html/devprof.asp Printer Working Group WHDC Printing home page: WHDC Still Imaging / WIA home page:

Additional Resources For developer print questions: microsoft.com For developer scan questions: microsoft.com For developer color questions: microsoft.com DDK Especially important: read the section entitled “How to Use Decorations in INF Files for Printer Drivers” which was recently updated. This is currently on MSDN. White papers: On Printer Driver Setup: 64-bit Drivers and Platforms For print administrators Information on planning for mixed 32-bit/64-bit environments will be published on

© 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.