Download presentation
Presentation is loading. Please wait.
1
Device Access Tomas Lukša
2
Purpose of the Device Access API
You can use the Device Access API to write Windows Store device apps for specialized devices that use custom drivers. The API provides methods for sending control codes to communicate with the device's custom driver.
3
About the Device Access API
The Device Access API is for C++ developers who are creating a Windows Store app to interact with specialized devices in Windows 8. The Device Access API is designed for independent hardware vendor (IHV) developers who are familiar with C++ and Component Object Model (COM). Component Object Model (COM) is a binary-interface standard for software components introduced by Microsoft. It is used to enable inter-process communication object creation in a large range of programming languages.
4
About the Device Access API
Developers for independent hardware vendors (IHVs) can build a Windows Store app that's paired with their device and automatically acquired when the device is installed. This app, known as a Windows Store device app, can provide unique device functionality. Devices that don't have built-in class drivers or Windows Runtime APIs for communicating with the device in Windows 8 are known as specialized devices. These devices might require a custom driver.
5
About the Device Access API
The Windows Store device app for a specialized device that must communicate with a device's custom driver can't use Microsoft Win32 APIs like DeviceIoControl and CreateFile to send IOCTLs to the device. The restricted security environment where Windows Store device apps run require that you use the Device Access API to communicate with your custom driver from a Windows Store app. The developer of a custom device restricts access to approved, privileged applications.
6
When to Use Device Access API
These are the main devices that require you to use Device Access API: Sensor; Location; Webcam; Proximity; Short message service (SMS); Mobile broadband; A device that doesn't have a Windows-provided class extension or class driver.
7
Implementing the Device Access Object: Step 1
To instantiate the device access object, you must first call the CreateDeviceAccessInstance function. If CreateDeviceAccessInstance succeeds, you can then call the Wait method to wait for the asynchronous operation to finish. If Wait succeeds, you can retrieve an IDeviceIoControl object (or the appropriate error) from the GetResult method.
8
Implementing the Device Access Object: Step 2
Call to the DeviceIoControlSync method. Example can be found here.
9
Declaring the Device Capability
In your application manifest, you'll need to add a device capability, as follows: This is an example of a capability declaration for a custom device. The GUID is the GUID of the device interface class.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.