WDF Custom Driver Design Pattern

Slides:



Advertisements
Similar presentations
HCE AND BLE UNIVERSITY TOMORROWS TRANSACTIONS LONDON, 20 TH MARCH 2014.
Advertisements

Notes to the presenter. I would like to thank Jim Waldo, Jon Bostrom, and Dennis Govoni. They helped me put this presentation together for the field.
Where Do the 7 layers “fit”? Or, where is the dividing line between hdw & s/w? ? ?
Asper School of Business University of Manitoba Systems Analysis & Design Instructor: Bob Travica System architectures Updated: November 2014.
Lesson 9: Creating and Configuring Virtual Networks
Michael Niehaus OS DeploymentApp Deployment Infrastructure Deployment.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
WINDOWS SERVICES. Introduction You often need programs that run continuously in the background Examples: – servers –Print spooler You often need.
Customising Web Application Security Richard Wilson University of Melbourne, Australia Daniel Lowes University of Pretoria, South Africa.
Basic Concepts Of CITRIX XENAPP.
1 Tradedoubler & Mobile Mobile web & app tracking technical overview.
WCL302. OS DeploymentApp Deployment Infrastructure Deployment.
Compatibility and Interoperability Requirements
Storage Device Design Pattern JEFF MEISSNER; KEN HARDY Windows Program Management.
Enhanced Storage Architecture
Chapter 11 Working with Credit Card Methods of Processing Credit Cards Preparing for Cyber Cash Authoring a Credit card Transaction.
5 Lesson 5: Installing and Configuring Desktop Applications and Windows Store Apps MOAC : Configuring Windows 8.1.
Developing Windows ® 2000 Certified Applications Richard Clay Program Manager Windows Infrastructure Microsoft Corporation
Wireless and Mobile Security
WHQL Code Coverage Prototype Program Andy Wen. 2 Agenda What is Code Coverage Prototype Program? What is Code Coverage Prototype Program? A prototype.
PAYWARE MOBILE API – APP TO APP INTEGRATION. PAYWARE MOBILE API OVERVIEW VeriFone’s PAYware Mobile API provides iPhone developers the ability to easily.
Windows NT ® Security Management: Extending Windows NT 5.0 Security Management Tools, Part 2 Praerit Garg Program Manager Windows NT Security Microsoft.
Northwest Arkansas.Net User Group Jay Smith Tyson Foods, Inc. Unit Testing nUnit, nUnitAsp, nUnitForms.
Saahithi Chillara Radhika Goyal ECE Fall Senior Design Project.
Application Sharing Bhavesh Amin Casey Miller Casey Miller Ajay Patel Ajay Patel Bhavesh Thakker Bhavesh Thakker.
ClickOnce Deployment (One-click Deployment)
Introduction to Operating Systems Concepts
For Rapid Application Development Developed By
Interfaces 101 Interfaces provide connectivity for the drawers to virtually any POS device (printer, terminal, tablet etc.) in the industry.
What is Database Administration ?
ArcGIS for Server Security: Advanced
11/12/ :06 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Introduction to Windows Azure AppFabric
Wireless Communication and Networks
Android.
EE-587 Spring FEB 08 William Mullins
© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company All rights reserved. Page 1 Fundamentals of Information Systems.
Windows 8 Hardware Certification Program and KIT Overview
A Fast Track into Device Guard
Developing Drivers in Visual Studio
MCSA VCE
Building a great Metro style device app for your printer
Security in Windows Store apps
Designing great devices and drivers
Connecting Bluetooth Low Energy devices to Windows
What is an Operating System?
Microsoft Build /17/2018 5:42 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Modernizing App Experiences
Chapter 3: Windows7 Part 4.
Device Guard: AppLocker on steroids
Building great Metro style apps for mobile broadband devices
Unit 27: Network Operating Systems
Building Metro style apps that connect to specialized devices
Design Patterns for Connected Specialized Devices
Microsoft Services Provider License Agreement Program reference card
The Application Lifecycle
Chapter 2: System Structures
Prepare your apps for Windows 8 and beyond
Device Apps Joseph Ngari| Program Manager.
SharePoint Online Authentication Patterns
Best practices for packaging and distributing device drivers
Delivering great hardware solutions for Windows
Device Access Tomas Lukša.
Oriented Design and Abstract Data Type
Remedy Integration Strategy Leverage the power of the industry’s leading service management solution via open APIs February 2018.
ClickOnce Deployment (One-click Deployment)
Windows Forms in Visual Studio 2005: An in-depth look at key features
Mark Quirk Head of Technology Developer & Platform Group
Presented by Greta Jurgelevičiūtė
Preparing for the Windows 8. 1 MCSA Module 6: Securing Windows 8
Presentation transcript:

WDF Custom Driver Design Pattern Peter wieland Software Design Engineer

Agenda What is the WDF Custom Driver Pattern? Example Components Device Custom Driver App Device Metadata Design Guidance Questions & Code Walkthrough

WDF Custom Driver Pattern A device, such as a USB attached device, that doesn't fit into any of the other patterns. Protocols: Any. A custom device driver provides access to the device from the app Access Model: Restricted API: Device Access: (CreateDeviceAccessInstance(), IDeviceIoControl()) Advantages Disadvantages Can meet needs of the broadest range of devices Requires development, certification & maintenance of a custom device driver Vendor controls which Metro style apps access their device Only vertical solutions are supported, and only a small # of apps can have privileged access to the device Existing custom drivers can be easily adapted for this pattern This is the most complicated pattern with the most components and moving parts. Communications between app and driver must be written in C++ Not supported for external devices on WinRT

WDF Custom Driver Pattern Example Custom USB Device : USB credit-card reader with app to perform CC transactions Acquisition Scenarios: Automatic Acquisition, Windows Store Download Device Discovery: Windows.Devices.Enumeration Device Access: CreateDeviceAccessInstance(), IDeviceIoControl Device Device driver Device metadata Metro style app + meta app

Components Custom WDF Driver pattern can be applied to any device Other patterns may be a better fit, depending on the device Device must have a unique hardware ID Device must be pass Windows Hardware Certification For use with real, external devices Not software or virtualized devices Device

Components Written using Windows Driver Framework (WDF) Device Driver Written using Windows Driver Framework (WDF) Driver can be user-mode or kernel-mode WDF driver See Using the Windows Driver Framework to build better drivers Driver provides communications between app & device Registers a custom device interface for the app to open Sets restricted property on interface to grant privileged app access App sends I/O controls to the driver to control device Driver should be signed and deployed to Windows Update Custom driver can use other drivers to talk to device e.g. USB HID drivers Device driver

Components app Declares the custom device interface class as a device capability in app manifest Discovers device interface using DeviceInformation’s FindAllAsync() method Opens a handle to the device using CreateDeviceAccessInstance() Communicates with device using IDeviceIoControl interface Last two steps can only be done in C++ code Recommend creating a C++ WinRT component for this app Metro style app

meta Components For the purposes of a device app, Device Metadata: Declares your app as a privileged app Set AccessCustomDriver attribute to “true” Declares your app as an automatically acquired app for the device Permission applies to the device container App can access any restricted interface it has declared access to in the container meta Device metadata

Design Guidance Authoring the Device Driver Write custom drivers in user-mode WDF where possible Drivers must be certified with the Windows Hardware Certification Kit (WHCK) Check Windows Hardware Certification requirements for your device type May want to create new device interface specifically for device app Can provide different capabilities to admin running desktop app vs. normal user running device app Many existing device interfaces assume administrator access App to driver interface can only use IOCTLs

Updating with Custom WDF Pattern Loose coupling between app, device metadata, and drivers. Components are distributed through different services with update rhythms: App updates – Available sometime after acceptance. Users are notified of an update and must initiate update. Device metadata updates – 2 days after acceptance, auto-download within 8 days Driver updates – available sometime after acceptance. Driver notification & update dependent on Windows Update client settings. Components need to behave gracefully when all proper components are not present. (maintain forward and backward compatibility)

Sample Walkthrough

Summary Very flexible in terms of devices supported Only supports restricted app model Certified custom driver makes this a costly pattern Beware of compatibility between components