|
SpacePoint Fusion plugin 1.0
|
00001 /*++ 00002 00003 Copyright (c) 1996 Microsoft Corporation 00004 00005 Module Name: 00006 00007 HIDDLL.H 00008 00009 Abstract: 00010 00011 This module contains the PUBLIC definitions for the 00012 code that implements the HID dll. 00013 00014 Environment: 00015 00016 Kernel & user mode 00017 00018 Revision History: 00019 00020 Aug-96 : created by Kenneth Ray 00021 00022 --*/ 00023 00024 00025 #ifndef _HIDSDI_H 00026 #define _HIDSDI_H 00027 00028 #include <pshpack4.h> 00029 00030 //#include "wtypes.h" 00031 00032 //#include <windef.h> 00033 //#include <win32.h> 00034 //#include <basetyps.h> 00035 00036 typedef LONG NTSTATUS; 00037 #include "hidusage.h" 00038 #include "hidpi.h" 00039 00040 typedef struct _HIDD_CONFIGURATION { 00041 PVOID cookie; 00042 ULONG size; 00043 ULONG RingBufferSize; 00044 } HIDD_CONFIGURATION, *PHIDD_CONFIGURATION; 00045 00046 typedef struct _HIDD_ATTRIBUTES { 00047 ULONG Size; // = sizeof (struct _HIDD_ATTRIBUTES) 00048 00049 // 00050 // Vendor ids of this hid device 00051 // 00052 USHORT VendorID; 00053 USHORT ProductID; 00054 USHORT VersionNumber; 00055 00056 // 00057 // Additional fields will be added to the end of this structure. 00058 // 00059 } HIDD_ATTRIBUTES, *PHIDD_ATTRIBUTES; 00060 00061 00062 BOOLEAN __stdcall 00063 HidD_GetAttributes ( 00064 IN HANDLE HidDeviceObject, 00065 OUT PHIDD_ATTRIBUTES Attributes 00066 ); 00067 /*++ 00068 Routine Description: 00069 Fill in the given HIDD_ATTRIBUTES structure with the attributes of the 00070 given hid device. 00071 00072 --*/ 00073 00074 00075 void __stdcall 00076 HidD_GetHidGuid ( 00077 OUT LPGUID HidGuid 00078 ); 00079 00080 BOOLEAN __stdcall 00081 HidD_GetPreparsedData ( 00082 IN HANDLE HidDeviceObject, 00083 OUT PHIDP_PREPARSED_DATA * PreparsedData 00084 ); 00085 /*++ 00086 Routine Description: 00087 Given a handle to a valid Hid Class Device Oject retrieve the preparsed data. 00088 This routine will ``malloc'' the apropriately size buffer to hold this 00089 preparsed data. It is up to the caller to then free that data at the 00090 caller's conveniance. 00091 00092 Arguments: 00093 HidDeviceObject a handle to a HidDeviceObject. The client can obtain this 00094 handle via a create file on a string name of a Hid device. 00095 This string name can be obtained using standard PnP calls. 00096 PreparsedData an opaque data used by other functions in this library to 00097 retreive information about a given device. 00098 00099 Return Value: 00100 TRUE if successful. 00101 00102 errors returned by DeviceIoControl 00103 00104 --*/ 00105 00106 BOOLEAN __stdcall 00107 HidD_FreePreparsedData ( 00108 IN PHIDP_PREPARSED_DATA PreparsedData 00109 ); 00110 00111 BOOLEAN __stdcall 00112 HidD_FlushQueue ( 00113 IN HANDLE HidDeviceObject 00114 ); 00115 /*++ 00116 Routine Description: 00117 Flush the input queue for the given HID device. 00118 00119 Arguments: 00120 HidDeviceObject a handle to a HidDeviceObject. The client can obtain this 00121 handle via a create file on a string name of a Hid device. 00122 This string name can be obtained using standard PnP calls. 00123 00124 Return Value: 00125 TRUE if successful 00126 00127 errors returned by DeviceIoControl 00128 --*/ 00129 00130 00131 BOOLEAN __stdcall 00132 HidD_GetConfiguration ( 00133 IN HANDLE HidDeviceObject, 00134 OUT PHIDD_CONFIGURATION Configuration, 00135 IN ULONG ConfigurationLength 00136 ); 00137 /*++ 00138 Routine Description: 00139 Get the configuration information for this hid device 00140 00141 Arguments: 00142 HidDeviceObject a handle to a HidDeviceObject. 00143 Configuration a configuration structure. You MUST call HidD_GetConfiguration 00144 before you can modify the configuration and use 00145 HidD_SetConfiguration. 00146 ConfigurationLength that is ``sizeof (HIDD_CONFIGURATION)'' using this 00147 parameter we can later increase the length of the configuration 00148 array and maybe not break older apps. 00149 00150 Return Value: 00151 same as others 00152 --*/ 00153 00154 BOOLEAN __stdcall 00155 HidD_SetConfiguration ( 00156 IN HANDLE HidDeviceObject, 00157 IN PHIDD_CONFIGURATION Configuration, 00158 IN ULONG ConfigurationLength 00159 ); 00160 /*++ 00161 Routine Description: 00162 Set the configuration information for this hid device 00163 00164 Arguments: 00165 HidDeviceObject a handle to a HidDeviceObject. 00166 Configuration a configuration structure. You MUST call HidD_GetConfiguration 00167 before you can modify the configuration and use 00168 HidD_SetConfiguration. 00169 ConfigurationLength that is ``sizeof (HIDD_CONFIGURATION)'' using this 00170 parameter will allow us later to inclrease the size of the 00171 configuration structure. 00172 00173 00174 Return Value: 00175 same as others 00176 --*/ 00177 00178 BOOLEAN __stdcall 00179 HidD_GetFeature ( 00180 IN HANDLE HidDeviceObject, 00181 OUT PVOID ReportBuffer, 00182 IN ULONG ReportBufferLength 00183 ); 00184 /*++ 00185 Routine Description: 00186 Retrieve a feature report from a HID device. 00187 00188 --*/ 00189 00190 BOOLEAN __stdcall 00191 HidD_SetFeature ( 00192 IN HANDLE HidDeviceObject, 00193 IN PVOID ReportBuffer, 00194 IN ULONG ReportBufferLength 00195 ); 00196 /*++ 00197 Routine Description: 00198 Send a feature report to a HID device. 00199 00200 --*/ 00201 00202 BOOLEAN __stdcall 00203 HidD_GetNumInputBuffers ( 00204 IN HANDLE HidDeviceObject, 00205 OUT PULONG NumberBuffers 00206 ); 00207 BOOLEAN __stdcall 00208 HidD_SetNumInputBuffers ( 00209 IN HANDLE HidDeviceObject, 00210 OUT ULONG NumberBuffers 00211 ); 00212 /*++ 00213 00214 Routine Description: 00215 Number of hid packets actually retained 00216 00217 --*/ 00218 00219 BOOLEAN __stdcall 00220 HidD_GetPhysicalDescriptor ( 00221 IN HANDLE HidDeviceObject, 00222 OUT PVOID Buffer, 00223 IN ULONG BufferLength 00224 ); 00225 00226 BOOLEAN __stdcall 00227 HidD_GetManufacturerString ( 00228 IN HANDLE HidDeviceObject, 00229 OUT PVOID Buffer, 00230 IN ULONG BufferLength 00231 ); 00232 00233 BOOLEAN __stdcall 00234 HidD_GetProductString ( 00235 IN HANDLE HidDeviceObject, 00236 OUT PVOID Buffer, 00237 IN ULONG BufferLength 00238 ); 00239 00240 BOOLEAN __stdcall 00241 HidD_GetIndexedString ( 00242 IN HANDLE HidDeviceObject, 00243 IN ULONG StringIndex, 00244 OUT PVOID Buffer, 00245 IN ULONG BufferLength 00246 ); 00247 00248 BOOLEAN __stdcall 00249 HidD_GetSerialNumberString ( 00250 IN HANDLE HidDeviceObject, 00251 OUT PVOID Buffer, 00252 IN ULONG BufferLength 00253 ); 00254 00255 #include <poppack.h> 00256 00257 #endif
1.7.3