Name.MaximumLength = wcslen(ObjectType) * sizeof(WCHAR) + CreateParametersSize + 2 * sizeof(WCHAR);
Name.MaximumLength += sizeof(WCHAR);
/* acquire request buffer */
- Name.Buffer = ExAllocatePool(NonPagedPool, Name.MaximumLength);
+ Name.Buffer = AllocateItem(NonPagedPool, Name.MaximumLength);
/* check for success */
if (!Name.Buffer)
{
IO_NO_PARAMETER_CHECKING | IO_FORCE_ACCESS_CHECK);
/* free request buffer */
- ExFreePool(Name.Buffer);
+ FreeItem(Name.Buffer);
return Status;
}
KeyName.Length = 0;
KeyName.MaximumLength = LocalMachine.Length + GuidString.Length + sizeof(WCHAR);
- KeyName.Buffer = ExAllocatePool(PagedPool, KeyName.MaximumLength);
+ KeyName.Buffer = AllocateItem(PagedPool, KeyName.MaximumLength);
if (!KeyName.Buffer)
{
Irp->IoStatus.Information = 0;
InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, NULL, NULL);
Status = ZwOpenKey(&hKey, GENERIC_READ, &ObjectAttributes);
- ExFreePool(KeyName.Buffer);
+ FreeItem(KeyName.Buffer);
if (!NT_SUCCESS(Status))
{
}
ASSERT(Size);
- KeyInfo = (PKEY_VALUE_PARTIAL_INFORMATION) ExAllocatePool(NonPagedPool, Size);
+ KeyInfo = (PKEY_VALUE_PARTIAL_INFORMATION) AllocateItem(NonPagedPool, Size);
if (!KeyInfo)
{
Status = STATUS_NO_MEMORY;
Status = ZwQueryValueKey(hKey, &Name, KeyValuePartialInformation, (PVOID)KeyInfo, Size, &Size);
if (!NT_SUCCESS(Status))
{
- ExFreePool(KeyInfo);
+ FreeItem(KeyInfo);
ZwClose(hKey);
Irp->IoStatus.Information = 0;
break;
{
Irp->IoStatus.Information = KeyInfo->DataLength + sizeof(WCHAR);
Status = STATUS_MORE_ENTRIES;
- ExFreePool(KeyInfo);
+ FreeItem(KeyInfo);
break;
}
RtlMoveMemory(Irp->UserBuffer, &KeyInfo->Data, KeyInfo->DataLength);
((LPWSTR)Irp->UserBuffer)[KeyInfo->DataLength / sizeof(WCHAR)] = L'\0';
Irp->IoStatus.Information = KeyInfo->DataLength + sizeof(WCHAR);
- ExFreePool(KeyInfo);
+ FreeItem(KeyInfo);
break;
default:
Irp->IoStatus.Information = 0;