microsoft / microsoft/wdkmetadata

Signature is incorrect for many callbacks

Open
#89 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
110
Forks
15
PR merge metrics
No merged PRs in 30d

Description

Microsoft.Windows.WDK.Win32Metadata 0.13.25-experimental contains these definitions:

namespace Windows.Wdk.System.SystemServices;

[StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public unsafe delegate NTSTATUS EX_CALLBACK_FUNCTION([In] void* CallbackContext, [Optional][In] void* Argument1, [Optional][In] void* Argument2);

[StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate NTSTATUS PEX_CALLBACK_FUNCTION();

where PEX_CALLBACK_FUNCTION has a bad signature and EX_CALLBACK_FUNCTION is unused anywhere. PEX_CALLBACK_FUNCTION should be remapped to EX_CALLBACK_FUNCTION.

This pattern is repeated for a number of callback types. Many of the types in emptyDelegatesAllowList.rsp have this issue and should be removed from the allowlist.

This seems like the same issue as https://github.com/microsoft/wdkmetadata/issues/47.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting emptyDelegatesAllowList.rsp and the generated callback definitions shown in the issue. Compare the allowlisted types with the EX_CALLBACK_FUNCTION and PEX_CALLBACK_FUNCTION pattern, using issue #47 for context. Done means affected allowlist entries are removed and callback signatures are remapped consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, csharp
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.