VhfCreate function (vhf.h)
The HID source driver calls this method to create a virtual HID device.
NTSTATUS VhfCreate(
[in] PVHF_CONFIG VhfConfig,
[out] VHFHANDLE *VhfHandle
);
[in] VhfConfig
A pointer to a VHF_CONFIG structure.
[out] VhfHandle
A handle to the new virtual HID device.
If the VhfCreate call succeeds, the method returns STATUS_SUCCESS. Otherwise an appropriate NTSTATUS value.
This method returns synchronously after validating the VHF_CONFIG structure and creating a virtual HID device. The virtual HID device is only reported to PnP. The initialization, installation, and starting of the device may not complete before this method returns.
A Kernel-Mode Driver Framework (KMDF) driver can call VhfCreate at any point after successfully creating its own device object by calling WdfDeviceCreate. The driver can do so in its EvtDriverDeviceAdd, EvtDevicePrepareHardware, EvtDeviceD0Entry, EvtDeviceSelfManagedIoInit.
VHF does not invoke any callback functions that are specified in VHF_CONFIG until the HID source driver calls VhfStart.
Requirement | Value |
---|---|
Target Platform | Windows |
Header | vhf.h |
Library | VhfKm.lib |
IRQL | PASSIVE_LEVEL |
Write a HID source driver by using Virtual HID Framework (VHF)