[HIDPARSE]

- Use pool tagging
- Avoid a cast

svn path=/trunk/; revision=58996
This commit is contained in:
Thomas Faber 2013-05-11 15:41:22 +00:00
parent 22eb29b7fb
commit d070a9875a
2 changed files with 6 additions and 4 deletions

View file

@ -15,7 +15,7 @@ NTAPI
AllocFunction(
IN ULONG ItemSize)
{
PVOID Item = ExAllocatePool(NonPagedPool, ItemSize);
PVOID Item = ExAllocatePoolWithTag(NonPagedPool, ItemSize, HIDPARSE_TAG);
if (Item)
{
//
@ -38,7 +38,7 @@ FreeFunction(
//
// free item
//
ExFreePool(Item);
ExFreePoolWithTag(Item, HIDPARSE_TAG);
}
VOID
@ -259,7 +259,7 @@ HidP_GetUsagesEx(
IN PCHAR Report,
IN ULONG ReportLength)
{
return HidP_GetUsages(ReportType, HID_USAGE_PAGE_UNDEFINED, LinkCollection, (PUSAGE)ButtonList, UsageLength, PreparsedData, Report, ReportLength);
return HidP_GetUsages(ReportType, HID_USAGE_PAGE_UNDEFINED, LinkCollection, &ButtonList->Usage, UsageLength, PreparsedData, Report, ReportLength);
}
HIDAPI

View file

@ -8,4 +8,6 @@
#define NDEBUG
#include <debug.h>
#include "hidparser.h"
#include <stdio.h>
#include <stdio.h>
#define HIDPARSE_TAG 'PdiH'