Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

658 lines
20 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. HID.c
  5. Abstract:
  6. WinDbg Extension Api
  7. Author:
  8. Kenneth D. Ray (kenray) June 1997
  9. Environment:
  10. User Mode.
  11. Revision History:
  12. --*/
  13. #include "precomp.h"
  14. typedef union _HID_PPD_FLAGS {
  15. struct {
  16. ULONG InputChannels : 1;
  17. ULONG OutputChannels : 1;
  18. ULONG FeatureChannels : 1;
  19. ULONG LinkCollections : 1;
  20. ULONG FullChannelListing : 1;
  21. ULONG ReportLocation : 1;
  22. ULONG Reserved : 25;
  23. ULONG IgnoreSignature : 1;
  24. };
  25. ULONG64 Flags;
  26. } HID_PPD_FLAGS;
  27. typedef union _HID_FLAGS {
  28. struct {
  29. ULONG FullListing : 1;
  30. ULONG PowerListing : 1;
  31. ULONG HidPDeviceDesc : 1;
  32. ULONG FileListing : 1;
  33. ULONG Reserved : 27;
  34. };
  35. ULONG64 Flags;
  36. } HID_FLAGS;
  37. #define PRINT_FLAGS(value, flag) \
  38. if ((value) & (flag)) { \
  39. dprintf (#flag " "); \
  40. }
  41. //
  42. // Local function declarations
  43. //
  44. VOID HID_DumpPpd (ULONG64 Ppd, HID_PPD_FLAGS Flags);
  45. VOID HID_DumpFDOExt (ULONG64 Fdo);
  46. VOID HID_DumpPDOExt (ULONG64 Pdo);
  47. DECLARE_API( hidppd )
  48. /*++
  49. Routine Description:
  50. Dumps a HID Preparsed Data blob
  51. Arguments:
  52. args - Address flags
  53. Return Value:
  54. None
  55. --*/
  56. {
  57. ULONG64 memLoc=0;
  58. ULONG result;
  59. ULONG size;
  60. HID_PPD_FLAGS flags;
  61. ULONG InSize;
  62. flags.Flags = 0;
  63. if (!*args) {
  64. dprintf ("hidppd <address> [flags]\n");
  65. } else {
  66. if (GetExpressionEx(args, &memLoc, &args)) {
  67. GetExpressionEx(args, &(flags.Flags), &args);
  68. }
  69. }
  70. dprintf ("Dump Ppd %p %x \n", memLoc, (ULONG)flags.Flags);
  71. //
  72. // Get the preparsed data
  73. //
  74. if (GetFieldValue (memLoc, "hidparse!_HIDP_PREPARSED_DATA", "Input.Size", InSize)) {
  75. dprintf ("Could not read hidparse!_HIDP_PREPARSED_DATA @%p\n", memLoc);
  76. return E_INVALIDARG;
  77. }
  78. InitTypeRead(memLoc, hidparse!_HIDP_PREPARSED_DATA);
  79. size = GetTypeSize ("hidparse!_HIDP_PREPARSED_DATA")
  80. + (GetTypeSize ("hidparse!_HIDP_CHANNEL_DESC")
  81. * ((ULONG) ReadField(Input.Size) + (ULONG) ReadField(Output.Size) + (ULONG) ReadField(Feature.Size)))
  82. + (GetTypeSize ("hidparse!_HIDP_LINK_COLLECTION_NODE")
  83. * (ULONG) ReadField(LinkCollectionArrayLength));
  84. dprintf ("TOT Size: %x\n", size);
  85. HID_DumpPpd (memLoc, flags);
  86. return S_OK;
  87. }
  88. VOID
  89. HID_DumpChannel (
  90. ULONG64 Channel,
  91. HID_PPD_FLAGS Flags
  92. )
  93. {
  94. InitTypeRead(Channel, hidparse!_HIDP_CHANNEL_DESC);
  95. dprintf ("-------CHANNEL---------\n");
  96. dprintf ("P %x ID %x Col %x Sz %x Cnt %x UMin %x UMax %x ",
  97. (ULONG) ReadField(UsagePage),
  98. (ULONG) ReadField(ReportID),
  99. (ULONG) ReadField(LinkCollection),
  100. (ULONG) ReadField(ReportSize),
  101. (ULONG) ReadField(ReportCount),
  102. (ULONG) ReadField(Range.UsageMin),
  103. (ULONG) ReadField(Range.UsageMax));
  104. if (ReadField(MoreChannels)) {
  105. dprintf ("MoreChannels ");
  106. }
  107. if (ReadField(IsConst)) {
  108. dprintf ("Const ");
  109. }
  110. if (ReadField(IsButton)) {
  111. dprintf ("Button ");
  112. } else {
  113. dprintf ("Value ");
  114. }
  115. if (ReadField(IsAbsolute)) {
  116. dprintf ("Absolute ");
  117. }
  118. if (ReadField(IsAlias)) {
  119. dprintf ("ALIAS! ");
  120. }
  121. dprintf ("\n");
  122. if (Flags.FullChannelListing) {
  123. dprintf ("LinkUP %x LinkU %x SMin %x SMax %x "
  124. "DMin %x DMax %x IndexMin %x IndexMax %x\n",
  125. (ULONG) ReadField(LinkUsagePage),
  126. (ULONG) ReadField(LinkUsage),
  127. (ULONG) ReadField(Range.StringMin),
  128. (ULONG) ReadField(Range.StringMax),
  129. (ULONG) ReadField(Range.DesignatorMin),
  130. (ULONG) ReadField(Range.DesignatorMax),
  131. (ULONG) ReadField(Range.DataIndexMin),
  132. (ULONG) ReadField(Range.DataIndexMax));
  133. if (!ReadField(IsButton)) {
  134. if (ReadField(Data.HasNull)) {
  135. dprintf ("Has Null ");
  136. }
  137. dprintf ("LMin %x LMax %x PMin %x PMax %x \n",
  138. (ULONG) ReadField(Data.LogicalMin),
  139. (ULONG) ReadField(Data.LogicalMax),
  140. (ULONG) ReadField(Data.PhysicalMin),
  141. (ULONG) ReadField(Data.PhysicalMax));
  142. }
  143. }
  144. if (Flags.ReportLocation) {
  145. dprintf ("ByteOffset %x BitOffset %x BitLength %x ByteEnd %x\n",
  146. (ULONG) ReadField(ByteOffset),
  147. (ULONG) ReadField(BitOffset),
  148. (ULONG) ReadField(BitLength),
  149. (ULONG) ReadField(ByteEnd));
  150. }
  151. }
  152. VOID
  153. HID_DumpLink (
  154. ULONG LinkNo,
  155. ULONG64 Node
  156. )
  157. {
  158. InitTypeRead(Node, hidparse!_HIDP_LINK_COLLECTION_NODE);
  159. dprintf ("Link %x: U %x P %x Par %p #C %x NxSib %p 1stC %p ",
  160. LinkNo,
  161. (ULONG) ReadField(LinkUsage),
  162. (ULONG) ReadField(LinkUsagePage),
  163. ReadField(Parent),
  164. (ULONG) ReadField(NumberOfChildren),
  165. ReadField(NextSibling),
  166. ReadField(FirstChild));
  167. if (ReadField(IsAlias)) {
  168. dprintf (" ALIAS\n");
  169. } else {
  170. dprintf ("\n");
  171. }
  172. }
  173. VOID
  174. HID_DumpPpd (
  175. ULONG64 Ppd,
  176. HID_PPD_FLAGS Flags
  177. )
  178. {
  179. ULONG i;
  180. ULONG64 channel;
  181. ULONG64 node;
  182. ULONG SizeOfChannels, DataOff;
  183. if (InitTypeRead(Ppd, hidparse!_HIDP_PREPARSED_DATA)) {
  184. dprintf("Cannot read type hidparse!_HIDP_PREPARSED_DATA at %p\n", Ppd);
  185. return;
  186. }
  187. if (!Flags.IgnoreSignature) {
  188. if ((HIDP_PREPARSED_DATA_SIGNATURE1 != (ULONG) ReadField(Signature1)) ||
  189. (HIDP_PREPARSED_DATA_SIGNATURE2 != (ULONG) ReadField(Signature2))) {
  190. dprintf("Preparsed Data signature does not match, probably aint\n");
  191. return;
  192. }
  193. }
  194. SizeOfChannels = GetTypeSize("hidparse!_HIDP_CHANNEL_DESC");
  195. GetFieldOffset("hidparse!_HIDP_CHANNEL_DESC", "Data", &DataOff);
  196. if (Flags.InputChannels) {
  197. dprintf ("\n========== Input Channels =========\n");
  198. for (i = (ULONG) ReadField(Input.Offset); i < (ULONG) ReadField(Input.Index); i++) {
  199. channel = Ppd + DataOff + SizeOfChannels * i;
  200. HID_DumpChannel (channel, Flags);
  201. }
  202. } else {
  203. dprintf ("Input channels: off %x sz %x indx %x bytelen %x\n",
  204. (ULONG) ReadField(Input.Offset),
  205. (ULONG) ReadField(Input.Size),
  206. (ULONG) ReadField(Input.Index),
  207. (ULONG) ReadField(Input.ByteLen));
  208. }
  209. if (Flags.OutputChannels) {
  210. dprintf ("\n========== Output Channels =========\n");
  211. for (i = (ULONG) ReadField(Output.Offset); i < (ULONG) ReadField(Output.Index); i++) {
  212. channel = Ppd + DataOff + SizeOfChannels * i;
  213. HID_DumpChannel (channel, Flags);
  214. }
  215. } else {
  216. dprintf ("Output channels: off %x sz %x indx %x bytelen %x\n",
  217. (ULONG) ReadField(Output.Offset),
  218. (ULONG) ReadField(Output.Size),
  219. (ULONG) ReadField(Output.Index),
  220. (ULONG) ReadField(Output.ByteLen));
  221. }
  222. if (Flags.FeatureChannels) {
  223. dprintf ("\n========== Feature Channels =========\n");
  224. for (i = (ULONG) ReadField(Feature.Offset); i < (ULONG) ReadField(Feature.Index); i++) {
  225. channel = Ppd + DataOff + SizeOfChannels * i;
  226. HID_DumpChannel (channel, Flags);
  227. }
  228. } else {
  229. dprintf ("Feature channels: off %x sz %x indx %x bytelen %x\n",
  230. (ULONG) ReadField(Feature.Offset),
  231. (ULONG) ReadField(Feature.Size),
  232. (ULONG) ReadField(Feature.Index),
  233. (ULONG) ReadField(Feature.ByteLen));
  234. }
  235. if (Flags.LinkCollections) {
  236. ULONG NodeSize;
  237. dprintf ("\n========== Link Collections =========\n");
  238. node = (ReadField(RawBytes) + ReadField(LinkCollectionArrayOffset));
  239. NodeSize = GetTypeSize("hidparse!_HIDP_LINK_COLLECTION_NODE");
  240. for (i = 0; i < (ULONG) ReadField(LinkCollectionArrayLength); i++, node+=NodeSize) {
  241. HID_DumpLink (i, node);
  242. }
  243. } else {
  244. dprintf ("Link Collections: %x \n",
  245. (ULONG) ReadField(LinkCollectionArrayLength));
  246. }
  247. dprintf ("\n");
  248. }
  249. VOID
  250. HID_DumpHidPDeviceDesc (
  251. ULONG64 Desc,
  252. HID_FLAGS Flags
  253. )
  254. {
  255. HID_PPD_FLAGS ppdFlags;
  256. ULONG result;
  257. ULONG i;
  258. ULONG size;
  259. PVOID col;
  260. PVOID rep;
  261. ULONG CollectionDescLength, ReportIDsLength;
  262. ULONG64 ReportIDs, CollectionDesc;
  263. ULONG SizeofDesc, SizeofRep;
  264. UNREFERENCED_PARAMETER (Flags);
  265. dprintf ("\n*** HID Device Descripton ***\n");
  266. InitTypeRead(Desc, hidparse!_HIDP_DEVICE_DESC);
  267. CollectionDesc = ReadField(CollectionDesc);
  268. ReportIDs = ReadField(ReportIDs);
  269. CollectionDescLength = (ULONG) ReadField(CollectionDescLength);
  270. ReportIDsLength = (ULONG) ReadField(ReportIDsLength);
  271. dprintf ("Col len: %x Report ID Len: %x\n",
  272. CollectionDescLength,
  273. ReportIDsLength);
  274. SizeofDesc = GetTypeSize("hidparse!_HIDP_COLLECTION_DESC");
  275. if (!SizeofDesc) {
  276. dprintf("Cannot find type hidparse!_HIDP_COLLECTION_DESC.\n");
  277. return;
  278. }
  279. SizeofRep = GetTypeSize("hidparse!_HIDP_REPORT_IDS");
  280. if (!SizeofRep) {
  281. dprintf("Cannot find type hidparse!_HIDP_REPORT_IDS.\n");
  282. return;
  283. }
  284. size = CollectionDescLength * SizeofDesc;
  285. col = LocalAlloc (LPTR, size);
  286. if (NULL == col) {
  287. dprintf ("Could not allocate the memory\n");
  288. return;
  289. }
  290. if (!ReadMemory (CollectionDesc, col, size, &result)) {
  291. dprintf ("Could not read Ppd\n");
  292. LocalFree (col);
  293. return;
  294. }
  295. size = ReportIDsLength * SizeofRep;
  296. rep = LocalAlloc (LPTR, size);
  297. if (NULL == rep) {
  298. dprintf ("Could not allocate the memory\n");
  299. LocalFree (col);
  300. return;
  301. }
  302. if (!ReadMemory (ReportIDs, rep, size, &result)) {
  303. dprintf ("Could not read Ppd\n");
  304. LocalFree (col);
  305. LocalFree (rep);
  306. return;
  307. }
  308. LocalFree (col);
  309. LocalFree (rep);
  310. dprintf ("--- Top Collections -----\n");
  311. for (i=0; i < CollectionDescLength; i++) {
  312. InitTypeRead(CollectionDesc + i*SizeofDesc, hidparse!_HIDP_COLLECTION_DESC);
  313. dprintf ("%x: U %x UP %x ColNum %x In %x Out %x Fea %x Ppd %x\n",
  314. i,
  315. (ULONG) ReadField(.Usage),
  316. (ULONG) ReadField(.UsagePage),
  317. (ULONG) ReadField(.CollectionNumber),
  318. (ULONG) ReadField(.InputLength),
  319. (ULONG) ReadField(.OutputLength),
  320. (ULONG) ReadField(.FeatureLength),
  321. (ULONG) ReadField(.PreparsedData));
  322. }
  323. dprintf ("--- Report IDs -----\n");
  324. for (i=0; i < ReportIDsLength; i++) {
  325. InitTypeRead(ReportIDs + i*SizeofRep, hidparse!_HIDP_REPORT_IDS);
  326. dprintf ("%x: ID %x ColNum %x In %x Out %x Fea %x\n",
  327. i,
  328. (ULONG) ReadField(.ReportID),
  329. (ULONG) ReadField(.CollectionNumber),
  330. (ULONG) ReadField(.InputLength),
  331. (ULONG) ReadField(.OutputLength),
  332. (ULONG) ReadField(.FeatureLength));
  333. }
  334. return;
  335. }
  336. VOID
  337. HID_DumpPDOExt (
  338. ULONG64 Pdo
  339. )
  340. {
  341. InitTypeRead(Pdo, hidparse!_HIDCLASS_DEVICE_EXTENSION);
  342. dprintf("\n");
  343. dprintf ("Collection Num %x Collection Index %x PDO %x Name %x \n"
  344. "Fdo Extension %x\n",
  345. (ULONG) ReadField(pdoExt.collectionNum),
  346. (ULONG) ReadField(pdoExt.collectionIndex),
  347. (ULONG) ReadField(pdoExt.pdo),
  348. (ULONG) ReadField(pdoExt.name),
  349. (ULONG) ReadField(pdoExt.deviceFdoExt));
  350. dprintf ("\n");
  351. }
  352. VOID
  353. HID_DumpFDOExt (
  354. ULONG64 Fdo
  355. )
  356. {
  357. ULONG64 object;
  358. ULONG64 fdoExt;
  359. ULONG size;
  360. ULONG i;
  361. ULONG result;
  362. ULONG64 loc;
  363. ULONG64 startLoc;
  364. HID_FLAGS Flags;
  365. ULONG FdoExtOffset;
  366. PVOID collection;
  367. ULONG PtrSize;
  368. ULONG SizeOfClassColl;
  369. ULONG CollectionDescLength;
  370. ULONG64 classCollectionArray, deviceRelations;
  371. ULONG fileExtListOff, fileListOff;
  372. ULONG devCapOff;
  373. InitTypeRead(Fdo, hidparse!_HIDCLASS_DEVICE_EXTENSION);
  374. dprintf("\n");
  375. dprintf("Fdo %p => PDO: %p NextDO %p \n"
  376. "MiniDeviceExt %p DriveExt %p\n",
  377. ReadField(fdoExt.fdo),
  378. ReadField(hidExt.PhysicalDeviceObject),
  379. ReadField(hidExt.NextDeviceObject),
  380. ReadField(hidExt.MiniDeviceExtension),
  381. ReadField(fdoExt.driverExt));
  382. switch ((ULONG) ReadField(fdoExt.state)) {
  383. case DEVICE_STATE_INITIALIZED:
  384. dprintf ("DEVICE_STATE_INITIALIZED: \n");
  385. break;
  386. case DEVICE_STATE_STARTING:
  387. dprintf ("DEVICE_STATE_STARTING: \n");
  388. break;
  389. case DEVICE_STATE_START_SUCCESS:
  390. dprintf ("DEVICE_STATE_START_SUCCESS: \n");
  391. break;
  392. case DEVICE_STATE_START_FAILURE:
  393. dprintf ("DEVICE_STATE_START_FAILURE: \n");
  394. break;
  395. case DEVICE_STATE_STOPPED:
  396. dprintf ("DEVICE_STATE_STOPPED: \n");
  397. break;
  398. case DEVICE_STATE_REMOVING:
  399. dprintf ("DEVICE_STATE_REMOVING: \n");
  400. break;
  401. case DEVICE_STATE_REMOVED:
  402. dprintf ("DEVICE_STATE_REMOVED: \n");
  403. break;
  404. case DEVICE_STATE_SUSPENDED:
  405. dprintf ("DEVICE_STATE_SUSPENDED: \n");
  406. break;
  407. }
  408. dprintf("\nHidDescriptor:: len %x bcd %x numDesc %x repleng %x \n",
  409. (ULONG) ReadField(fdoExt.hidDescriptor.bLength),
  410. (ULONG) ReadField(fdoExt.hidDescriptor.bcdHID),
  411. (ULONG) ReadField(fdoExt.hidDescriptor.bNumDescriptors),
  412. (ULONG) ReadField(fdoExt.hidDescriptor.DescriptorList[0].wReportLength));
  413. dprintf("Raw Desriptor: %x length: %x \n",
  414. (ULONG) ReadField(fdoExt.rawReportDescription),
  415. (ULONG) ReadField(fdoExt.rawReportDescriptionLength));
  416. dprintf("HIDP_DEVICE_DESC: %x\n", (ULONG) ReadField(fdoExt.deviceDesc));
  417. dprintf("Collections: %x Report IDs: %x\n",
  418. (CollectionDescLength = (ULONG) ReadField(fdoExt.deviceDesc.CollectionDescLength)),
  419. (ULONG) ReadField(fdoExt.deviceDesc.ReportIDsLength));
  420. dprintf("Device Relations Array: %p\n", (deviceRelations = ReadField(fdoExt.deviceRelations)));
  421. dprintf("Class Collection Array: %p\n", (classCollectionArray = ReadField(fdoExt.classCollectionArray)));
  422. Flags.Flags = 0x0F;
  423. HID_DumpHidPDeviceDesc (ReadField(fdoExt.deviceDesc), Flags);
  424. PtrSize = DBG_PTR_SIZE;
  425. SizeOfClassColl = GetTypeSize ("HIDCLASS_COLLECTION");
  426. size = (CollectionDescLength) * SizeOfClassColl;
  427. collection = LocalAlloc (0, size);
  428. if (!collection) {
  429. dprintf ("Could not allocate the memory\n");
  430. return;
  431. }
  432. //
  433. // Read entire array so that its cached for each element
  434. //
  435. if (!ReadMemory (classCollectionArray,
  436. collection,
  437. size,
  438. &result)) {
  439. dprintf ("Could not read Collection array\n");
  440. LocalFree (collection);
  441. return;
  442. }
  443. size = (CollectionDescLength + 1)* PtrSize;
  444. GetFieldOffset("HIDCLASS_COLLECTION", "FileExtensionList", &fileExtListOff);
  445. GetFieldOffset("HIDCLASS_FILE_EXTENSION", "FileList", &fileListOff);
  446. dprintf ("------ Children -----\n");
  447. for (i = 0; i < CollectionDescLength; i++) {
  448. ULONG64 objAddr;
  449. ReadPointer(deviceRelations + i* PtrSize, &objAddr);
  450. InitTypeRead(classCollectionArray + i*SizeOfClassColl, hidparse!_HIDCLASS_COLLECTION);
  451. dprintf ("DO: %p: ColNum %x ColIndx %x DevExt %x\n"
  452. " # Opens %x, FileExtList.Flink %p \n"
  453. " PollInterval ms %x, PolledDeviceReadQueue.Flink %p\n"
  454. " SymLinName %x Ppd %x PowerIrp %x\n",
  455. objAddr,
  456. (ULONG) ReadField(CollectionNumber),
  457. (ULONG) ReadField(CollectionIndex),
  458. (ULONG) ReadField(DeviceExtension),
  459. (ULONG) ReadField(NumOpens),
  460. ReadField(FileExtensionList.Flink),
  461. (ULONG) ReadField(PollInterval_msec),
  462. ReadField(polledDeviceReadQueue.Flink),
  463. (ULONG) ReadField(SymbolicLinkName.Buffer),
  464. (ULONG) ReadField(phidDescriptor),
  465. (ULONG) ReadField(powerEventIrp));
  466. dprintf (" DescSize %x polled %x VID %x PID %x Version %x\n",
  467. (ULONG) ReadField(hidCollectionInfo.DescriptorSize),
  468. (ULONG) ReadField(hidCollectionInfo.Polled),
  469. (ULONG) ReadField(hidCollectionInfo.VendorID),
  470. (ULONG) ReadField(hidCollectionInfo.ProductID),
  471. (ULONG) ReadField(hidCollectionInfo.VersionNumber));
  472. loc = ReadField(FileExtensionList.Flink);
  473. startLoc = classCollectionArray + fileExtListOff;
  474. dprintf (" File List %x\n", startLoc);
  475. i=0;
  476. while ((loc != startLoc) && (i++ < 100)) {
  477. ULONG64 Flink;
  478. loc = (loc - fileListOff);
  479. if (GetFieldValue(loc, "hidparse!_HIDCLASS_FILE_EXTENSION", "FileList.Flink", Flink)) {
  480. dprintf ("could not read hidparse!_HIDCLASS_FILE_EXTENSION at %p\n", loc);
  481. LocalFree (collection);
  482. return;
  483. }
  484. InitTypeRead(loc, hidparse!_HIDCLASS_COLLECTION);
  485. dprintf (" FileExt %p ColNum %x fdoExt %x\n"
  486. " PendingIrp.Flink %x Reports.Flink %x\n"
  487. " FILE %x Closing? %x \n",
  488. loc,
  489. (ULONG) ReadField(CollectionNumber),
  490. (ULONG) ReadField(fdoExt),
  491. (ULONG) ReadField(PendingIrpList.Flink),
  492. (ULONG) ReadField(ReportList.Flink),
  493. (ULONG) ReadField(FileObject),
  494. (ULONG) ReadField(Closing));
  495. loc = Flink;
  496. }
  497. }
  498. GetFieldOffset("hidparse!_HIDCLASS_DEVICE_EXTENSION", "fdoExt.deviceCapabilities", &devCapOff);
  499. DumpDeviceCapabilities (Fdo + devCapOff);
  500. LocalFree (collection);
  501. dprintf ("\n");
  502. return;
  503. }
  504. VOID
  505. DevExtHID(
  506. ULONG64 MemLocPtr
  507. )
  508. /*++
  509. Routine Description:
  510. Dump a HID Device extension.
  511. Arguments:
  512. Extension Address of the extension to be dumped.
  513. Return Value:
  514. None.
  515. --*/
  516. {
  517. ULONG isClientPdo, Signature;
  518. ULONG64 MemLoc = MemLocPtr;
  519. dprintf ("Dump HID Extension: %p\n", MemLoc);
  520. if (GetFieldValue (MemLoc, "HIDCLASS_DEVICE_EXTENSION", "isClientPdo", isClientPdo)) {
  521. dprintf ("Could not read HID Extension\n");
  522. }
  523. GetFieldValue (MemLoc, "HIDCLASS_DEVICE_EXTENSION", "Signature", Signature);
  524. if (HID_DEVICE_EXTENSION_SIG != Signature) {
  525. dprintf("HID Extension Signature does not match, probably aint\n");
  526. return;
  527. }
  528. if (isClientPdo)
  529. {
  530. HID_DumpPDOExt(MemLoc);
  531. }
  532. else
  533. {
  534. HID_DumpFDOExt(MemLoc);
  535. }
  536. return;
  537. }