microsoft / wdkmetadata

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

`Windows.Wdk.Foundation.IRP` refers to `Windows.Win32.Graphics.DirectDraw.MDL` #35

Closed kennykerr closed 1 year ago

kennykerr commented 1 year ago

Somehow, I don't think the WDK depends on DirectDraw.

kennykerr commented 1 year ago

For the most part, I'd expect only references to Windows.Win32.Foundation types. At the moment the following additional type dependencies exist:

image
mikebattista commented 1 year ago

MDL in the SDK should move to Windows.Win32.Foundation.

For the rest, I don't agree with your premise that the WDK metadata should only depend on Windows.Win32.Foundation. Would need more specific feedback to be actionable.

kennykerr commented 1 year ago

I don't know what your philosophy is for namespace dependencies. I'm just pointing out that the dependency graph is a bit chaotic right now. For example, to call the FsRtlBalanceReads function you need to include a dependency on the following namespaces:

I don't know what the answer is in general, but it may be that the current namespace scheme is really untenable for C/C++/Rust languages and we'll have to derive our own partitioning scheme algorithmically.

mikebattista commented 1 year ago

I'm not surprised by that given the experimental nature of the metadata.

In general, I'd expect Windows.Wdk.System.Threading to depend on APIs from Windows.Win32.System.Threading, Windows.Wdk.Storage.FileSystem to depend on Windows.Win32.Storage.FileSystem, etc. Where it makes sense to move SDK types to Windows.Win32.Foundation we can do that, but I don't think the goal is 100% of WDK dependencies are on Foundation.