NTSTATUS
PerfInfoReserveBytes(
      PPERFINFO_HOOK_HANDLE Hook,
      USHORT HookId,
      ULONG BytesToReserve
  );

Routine Description:

    Reserves memory for the hook via WMI and initializes the header.

Arguments:

    Hook - pointer to hook handle (used for reference decrement)
    HookId - Id for the hook
    BytesToLog - size of data in bytes

Return Value:

    STATUS_SUCCESS on success
    STATUS_UNSUCCESSFUL if the buffer memory couldn't be allocated.