VhfReadReportSubmit function

The HID source driver calls this method to submit a HID Read (Input) Report to Virtual HID Framework (VHF).

Syntax

NTSTATUS VhfReadReportSubmit(
  VHFHANDLE        VhfHandle,
  PHID_XFER_PACKET HidTransferPacket
);

Parameters

VhfHandle

A handle to a virtual HID device that your HID source driver received in the previous call to VhfCreate.

HidTransferPacket

A pointer to a HID_XFER_PACKET structure that describes the HID report.

Return Value

If the VhfReadReportSubmit call succeeds, the method returns STATUS_SUCCESS. Otherwise an appropriate NTSTATUS value.

Remarks

The HID source driver can choose to implement its buffering policy or let Virtual HID Framework (VHF) handle buffering.

If the driver uses its own buffering policy, then it must implement and register an EvtVhfReadyForNextReadReport callback function in its call to VhfCreate. It must call VhfReadReportSubmit only once after VHF has invoked EvtVhfReadyForNextReadReport. After the callback has been invoked, the driver can reuse the transfer buffer pointed to by HidTransferPacket. The driver must wait for the next time that VHF invokes EvtVhfReadyForNextReadReport before calling this method again.

If the HID source driver does not implement the EvtVhfReadyForNextReadReport callback, then there are no restrictions on calling this method. VHF uses the default buffering policy. The driver can reuse the transfer buffer after the call returns.

Requirements

   
Target Platform Windows
Header vhf.h
Library VhfKm.lib
IRQL <= DISPATCH_LEVEL

See Also

Write a HID source driver by using Virtual HID Framework (VHF)