www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - windows-d (Windows SDK projection) is ready

reply Alexander <roland.taverner gmail.com> writes:
Finally, I did it.

The original repository, 
[rumbu13/windows-d](https://github.com/rumbu13/windows-d), 
appears to be abandoned. The owner has not accepted even small 
PRs for at least three years. My fork is available here: 
[RolandTaverner/windows-d](https://github.com/RolandTaverner/windows-d).



1. Updated to the latest version of [Microsoft Win32 
Metadata](https://github.com/microsoft/win32metadata).
2. Added `version()` directives based on 
`SupportedArchitectureAttribute` values (`X86_64`, `AArch64`, 
`X86`) where available.
3. Added online documentation references from 
`DocumentationAttribute`.
4. Added `deprecated()` directives generated from 
`ObsoleteAttribute`.
5. Completely reworked the CLI metadata access code. The 
implementation is now heavily checked at compile time, making it 
much harder to accidentally mix up string indexes, GUID indexes 
and expecially coded indexes. Future contributors (if any) should 
have much less PITA working with the code.



1. Inline documentation generation. I haven't touched it yet.
2. WinRT support. I have no idea what's going on there, it 
references interfaces that don't seem to exist.
3. About a dozen x86-only functions in 
`windows.win32.system.diagnostics.debug`, because the 
architecture attributes in the metadata are missing.



`SupportedOSPlatformAttribute` describes the minimum required 
Windows version, with values such as: `windows10.0.10240`, 
`windows5.0` (yeah, this), `windows5.1.2600` and so on.
Because of this, it cannot be mapped to D's `version()` system. 
It's not even old good WINVER. The only solution I can see is 
generating code for a specific Windows version when necessary 
(not implemented yet).
Jun 02
next sibling parent reply "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
On 03/06/2026 8:26 AM, Alexander wrote:
 
       The PROBLEM: |SupportedOSPlatformAttribute|
 
 |SupportedOSPlatformAttribute| describes the minimum required Windows 
 version, with values such as: |windows10.0.10240|, |windows5.0| (yeah, 
 this), |windows5.1.2600| and so on. Because of this, it cannot be mapped 
 to D's |version()| system. It's not even old good WINVER. The only 
 solution I can see is generating code for a specific Windows version 
 when necessary (not implemented yet).
-version=windows10_0_10240 Now it is mapped ;)
Jun 02
parent Alexander <roland.taverner gmail.com> writes:
On Tuesday, 2 June 2026 at 22:16:00 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
 -version=windows10_0_10240

 Now it is mapped ;)
I mean, we need something like discussed in [this thread](https://forum.dlang.org/thread/aeEv52AzE0D-rAqn qfbox.info) because every function and type should be attributed like `version(win >= 5.1)` which will never be possible in D. But seems this can be emulated with `mixin template`s and `static if`'s.
Jun 03
prev sibling parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Tuesday, 2 June 2026 at 20:26:46 UTC, Alexander wrote:
 Finally, I did it.

 The original repository, 
 [rumbu13/windows-d](https://github.com/rumbu13/windows-d), 
 appears to be abandoned. The owner has not accepted even small 
 PRs for at least three years. My fork is available here: 
 [RolandTaverner/windows-d](https://github.com/RolandTaverner/windows-d).

 [...]
Well done
Jun 04