2 * Copyright (c) 2007-2010 SlimDX Group
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 #include "../multimedia/Enums.h"
32 /// Contains information about a device's identity.
34 public ref class DeviceInstance
37 System::Guid instanceGuid;
38 System::Guid productGuid;
39 System::Guid ffDriverGuid;
42 System::String^ instanceName;
43 System::String^ productName;
44 SlimDX::Multimedia::UsageId usage;
45 SlimDX::Multimedia::UsagePage usagePage;
49 DeviceInstance( const DIDEVICEINSTANCE &deviceInstance );
53 /// Gets the unique identifier for the instance of the device. Instance Guids are
54 /// specific to a particular computer.
56 property System::Guid InstanceGuid
58 System::Guid get() { return instanceGuid; }
62 /// Gets the unique identifier for the product. This identifier is established
63 /// by the manufacturer of the device.
65 property System::Guid ProductGuid
67 System::Guid get() { return productGuid; }
71 /// Gets the unique identifier for the driver being used for force-feedback. The
72 /// driver's manufacturer establishes this identifier.
74 property System::Guid ForceFeedbackDriverGuid
76 System::Guid get() { return ffDriverGuid; }
80 /// Gets the main device type specifier.
82 property DeviceType Type
84 DeviceType get() { return type; }
88 /// Gets the secondary device type specifier.
92 int get() { return subType; }
96 /// Gets the friendly name for the instance.
98 property System::String^ InstanceName
100 System::String^ get() { return instanceName; }
104 /// Gets the friendly name for the product.
106 property System::String^ ProductName
108 System::String^ get() { return productName; }
112 /// If the device is a Human Interface Device, this member contains
113 /// the HID usage code.
115 property SlimDX::Multimedia::UsageId UsageId
117 SlimDX::Multimedia::UsageId get() { return usage; }
121 /// If the device is a Human Interface Device, this member contains
122 /// the HID usage page code.
124 property SlimDX::Multimedia::UsagePage UsagePage
126 SlimDX::Multimedia::UsagePage get() { return usagePage; }
130 /// Gets a value indicating whether the device is a Human Interface Device.
132 property bool HumanInterfaceDevice
134 bool get() { return hid; }