microsoft / wdkmetadata

Tooling to generate metadata for Win32 APIs in the Windows Driver Kit (WDK).
Other
96 stars 10 forks source link

`VHF_CONFIG` callbacks have wrong signature #66

Closed kennykerr closed 5 months ago

kennykerr commented 6 months ago

In particular, the PEVT_VHF_ASYNC_OPERATION callback is defined as void PEVT_VHF_ASYNC_OPERATION() in metadata but the signature is clearly something else:

typedef
_Function_class_(EVT_VHF_ASYNC_OPERATION)
_IRQL_requires_max_(DISPATCH_LEVEL)
_IRQL_requires_same_
VOID
EVT_VHF_ASYNC_OPERATION(
    _In_
        PVOID               VhfClientContext,
    _In_
        VHFOPERATIONHANDLE  VhfOperationHandle,
    _In_opt_
        PVOID               VhfOperationContext,
    _In_
        PHID_XFER_PACKET    HidTransferPacket
    );

typedef EVT_VHF_ASYNC_OPERATION *PEVT_VHF_ASYNC_OPERATION;
kennykerr commented 6 months ago

This is still broken. The VHF_CONFIG struct has callback fields but the latest version has pointers to callbacks. A callback is already a function pointer so the way this is defined now has an extra pointer indirection.

image