digitalmars.D.announce - Windows Bindings v1.0
- Rumbu (4/4) Feb 16 2021 The D Windows SDK projection reached first version. Generated
- rikki cattermole (9/15) Feb 16 2021 All of the symbols and modules need to be documented so that the
- Rumbu (10/13) Feb 16 2021 Sincerely, I doubt that it's a good idea to duplicate gigs of
- rikki cattermole (5/15) Feb 16 2021 Its documented (partially).
- Steven Schveighoffer (7/20) Feb 17 2021 Note that in-line docs help with more than just putting docs on
- Rumbu (4/23) Feb 17 2021 OK, you convinced me :)
- Steven Schveighoffer (3/8) Feb 18 2021 Nice!
- Imperatorn (2/20) Feb 18 2021 🎂🎉
- Elronnd (2/2) Feb 16 2021 Maybe the wrong place to bring it up, but: any chance this will
- Imperatorn (2/4) Feb 16 2021 I'm also wondering about this
- Max Haughton (4/8) Feb 16 2021 Hi, I'll be getting in touch about featuring this on the D blog
- Rumbu (2/12) Feb 16 2021 It is ok on that e-mail.
- tchaloupka (4/8) Feb 17 2021 Thanks for this, looks great.
- Dennis (3/5) Feb 17 2021 +1
- Walter Bright (2/9) Feb 17 2021 Please file bugzilla issues for them!
- Dennis (15/16) Feb 18 2021 I'm not going to file issues for each individual module, since
- Rumbu (15/25) Feb 18 2021 I don't know what to say about nothrow. There are WinAPI
The D Windows SDK projection reached first version. Generated bindings were compiled succesfully. https://github.com/rumbu13/windows-d Destroy!
Feb 16 2021
On 16/02/2021 9:45 PM, Rumbu wrote:The D Windows SDK projection reached first version. Generated bindings were compiled succesfully. https://github.com/rumbu13/windows-d Destroy!All of the symbols and modules need to be documented so that the documentation generators will generate documentation for them. By the looks a good percentage of DirectX is in there. Which is wonderful. I checked as it will be important for a project like this, but it doesn't seem like the docs around IUnknown is correct. https://dlang.org/spec/interface.html#com-interfaces It seems the exact location for IUnknown doesn't matter. Great work!
Feb 16 2021
On Tuesday, 16 February 2021 at 08:53:06 UTC, rikki cattermole wrote:All of the symbols and modules need to be documented so that the documentation generators will generate documentation for them.Sincerely, I doubt that it's a good idea to duplicate gigs of WinAPI documentation which can be found on the official Microsoft sites. Or may be you want to stress test the D compiler when it's generating documentation :) WinAPI docs are available here [1] in md format (1.6Gb, 64280 files, 1347 folders). Someone should build a md scrapper. BTW, none of the core.sys.* packages are documented. [1] https://github.com/MicrosoftDocs/sdk-api
Feb 16 2021
On 17/02/2021 9:45 AM, Rumbu wrote:On Tuesday, 16 February 2021 at 08:53:06 UTC, rikki cattermole wrote:Its documented (partially). https://github.com/dlang/druntime/blob/master/src/core/sys/windows/aclui.d#L1 Note I am only talking about some ///'s at the end of the line. https://dlang.org/spec/ddoc.html#parsingAll of the symbols and modules need to be documented so that the documentation generators will generate documentation for them.Sincerely, I doubt that it's a good idea to duplicate gigs of WinAPI documentation which can be found on the official Microsoft sites. Or may be you want to stress test the D compiler when it's generating documentation :)
Feb 16 2021
On 2/16/21 3:45 PM, Rumbu wrote:On Tuesday, 16 February 2021 at 08:53:06 UTC, rikki cattermole wrote:Note that in-line docs help with more than just putting docs on dlang.org. It helps with IDEs that use the docs to tell you what your function you are typing is doing, and also if you are reading the source code.All of the symbols and modules need to be documented so that the documentation generators will generate documentation for them.Sincerely, I doubt that it's a good idea to duplicate gigs of WinAPI documentation which can be found on the official Microsoft sites. Or may be you want to stress test the D compiler when it's generating documentation :)WinAPI docs are available here [1] in md format (1.6Gb, 64280 files, 1347 folders). Someone should build a md scrapper.What about just having the short summary, and then links to the MS docs? -Steve
Feb 17 2021
On Wednesday, 17 February 2021 at 14:53:11 UTC, Steven Schveighoffer wrote:On 2/16/21 3:45 PM, Rumbu wrote:OK, you convinced me :) Enjoy: https://github.com/rumbu13/windows-d#featuresOn Tuesday, 16 February 2021 at 08:53:06 UTC, rikki cattermole wrote:Note that in-line docs help with more than just putting docs on dlang.org. It helps with IDEs that use the docs to tell you what your function you are typing is doing, and also if you are reading the source code.[...]Sincerely, I doubt that it's a good idea to duplicate gigs of WinAPI documentation which can be found on the official Microsoft sites. Or may be you want to stress test the D compiler when it's generating documentation :)WinAPI docs are available here [1] in md format (1.6Gb, 64280 files, 1347 folders). Someone should build a md scrapper.What about just having the short summary, and then links to the MS docs? -Steve
Feb 17 2021
On 2/17/21 2:01 PM, Rumbu wrote:OK, you convinced me :) Enjoy: https://github.com/rumbu13/windows-d#featuresNice! -Steve
Feb 18 2021
On Wednesday, 17 February 2021 at 19:01:31 UTC, Rumbu wrote:On Wednesday, 17 February 2021 at 14:53:11 UTC, Steven Schveighoffer wrote:🎂🎉On 2/16/21 3:45 PM, Rumbu wrote:OK, you convinced me :) Enjoy: https://github.com/rumbu13/windows-d#features[...]Note that in-line docs help with more than just putting docs on dlang.org. It helps with IDEs that use the docs to tell you what your function you are typing is doing, and also if you are reading the source code.[...]What about just having the short summary, and then links to the MS docs? -Steve
Feb 18 2021
Maybe the wrong place to bring it up, but: any chance this will be merged into core.sys.windows?
Feb 16 2021
On Tuesday, 16 February 2021 at 09:36:12 UTC, Elronnd wrote:Maybe the wrong place to bring it up, but: any chance this will be merged into core.sys.windows?I'm also wondering about this
Feb 16 2021
On Tuesday, 16 February 2021 at 08:45:19 UTC, Rumbu wrote:The D Windows SDK projection reached first version. Generated bindings were compiled succesfully. https://github.com/rumbu13/windows-d Destroy!Hi, I'll be getting in touch about featuring this on the D blog soon - would you prefer to be contacted anywhere other than your git email?
Feb 16 2021
On Tuesday, 16 February 2021 at 20:49:30 UTC, Max Haughton wrote:On Tuesday, 16 February 2021 at 08:45:19 UTC, Rumbu wrote:It is ok on that e-mail.The D Windows SDK projection reached first version. Generated bindings were compiled succesfully. https://github.com/rumbu13/windows-d Destroy!Hi, I'll be getting in touch about featuring this on the D blog soon - would you prefer to be contacted anywhere other than your git email?
Feb 16 2021
On Tuesday, 16 February 2021 at 08:45:19 UTC, Rumbu wrote:The D Windows SDK projection reached first version. Generated bindings were compiled succesfully. https://github.com/rumbu13/windows-d Destroy!Thanks for this, looks great. Could the generated code be annotated with nothrow nogc too? Tom
Feb 17 2021
On Wednesday, 17 February 2021 at 20:53:49 UTC, tchaloupka wrote:Thanks for this, looks great. Could the generated code be annotated with nothrow nogc too?+1 This is actually missing in many core.sys.windows modules.
Feb 17 2021
On 2/17/2021 2:09 PM, Dennis wrote:On Wednesday, 17 February 2021 at 20:53:49 UTC, tchaloupka wrote:Please file bugzilla issues for them!Thanks for this, looks great. Could the generated code be annotated with nothrow nogc too?+1 This is actually missing in many core.sys.windows modules.
Feb 17 2021
On Thursday, 18 February 2021 at 00:46:26 UTC, Walter Bright wrote:Please file bugzilla issues for them!I'm not going to file issues for each individual module, since there are about 100 of them. There already is a general issue about Windows headers: https://issues.dlang.org/show_bug.cgi?id=16267 I actually started working on adding the missing annotations to druntime half a year ago, but abandoned it because it took more time than expected. The tricky part is that modules can contain callback definitions, and adding nogc nothrow to those is a breaking change. This is where Argument dependent attributes (https://github.com/dlang/DIPs/pull/198) could be useful. I might pick it up again, but if these auto-generated bindings can be incorporated into core.sys.windows that wouldn't be necessary anymore.
Feb 18 2021
On Wednesday, 17 February 2021 at 20:53:49 UTC, tchaloupka wrote:On Tuesday, 16 February 2021 at 08:45:19 UTC, Rumbu wrote:I don't know what to say about nothrow. There are WinAPI functions generating exceptions. For example the code below trying to allocate size_t.max bytes, even we reserved 10 only: auto h = HeapCreate(4, 10, 10); auto p = HeapAlloc(h, 4, size_t.max); Now, the D runtime catches internally any Windows exception and throws a generic Win32 Error without any other information, and of course, this will qualify HeapAlloc as a nothrow function. In reality, this should not be just an uncatchable Error, but a full Exception object having the associated error code (0xC0000017), the associated default message ("Not Enough Quota") and the value of the offending parameter (0xFFFFFFFF). All this information is available in SEH records but it is ignored by D runtime.The D Windows SDK projection reached first version. Generated bindings were compiled succesfully. https://github.com/rumbu13/windows-d Destroy!Thanks for this, looks great. Could the generated code be annotated with nothrow nogc too? Tom
Feb 18 2021