www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - When is the Win API supported?

reply Igor <Vladamir.I google.com> writes:
When will the proper Win API be included in D? About how 
long(months, years?)? Does it support seamless narrow and wide 
characters?

I am not referring to the defunct win32 support already included.
Jan 24
parent reply Rikki Cattermole <alphaglosined gmail.com> writes:
On 25/01/16 2:46 PM, Igor wrote:
 When will the proper Win API be included in D? About how long(months,
 years?)? Does it support seamless narrow and wide characters?

 I am not referring to the defunct win32 support already included.
You mean the MingW based bindings that is in 2.070? https://github.com/D-Programming-Language/druntime/tree/v2.070.0-b2/src/core/sys/windows The only issue is for -m32 with import libs.
Jan 24
parent reply Igor <Vladamir.I google.com> writes:
On Monday, 25 January 2016 at 02:21:49 UTC, Rikki Cattermole 
wrote:
 On 25/01/16 2:46 PM, Igor wrote:
 When will the proper Win API be included in D? About how 
 long(months,
 years?)? Does it support seamless narrow and wide characters?

 I am not referring to the defunct win32 support already 
 included.
You mean the MingW based bindings that is in 2.070? https://github.com/D-Programming-Language/druntime/tree/v2.070.0-b2/src/core/sys/windows The only issue is for -m32 with import libs.
How do I use it? I can't find any docs on it(The D page, at least doesn't seem to have anything for windows in phobos except charset.
Jan 25
parent reply Vladimir Panteleev <thecybershadow.lists gmail.com> writes:
On Monday, 25 January 2016 at 18:09:47 UTC, Igor wrote:
 On Monday, 25 January 2016 at 02:21:49 UTC, Rikki Cattermole 
 wrote:
 On 25/01/16 2:46 PM, Igor wrote:
 When will the proper Win API be included in D? About how 
 long(months,
 years?)? Does it support seamless narrow and wide characters?

 I am not referring to the defunct win32 support already 
 included.
You mean the MingW based bindings that is in 2.070? https://github.com/D-Programming-Language/druntime/tree/v2.070.0-b2/src/core/sys/windows The only issue is for -m32 with import libs.
I've included the .def files that came with the Win32 bindings, and added them to the build, so many import libs will be supported already.
 How do I use it? I can't find any docs on it(The D page, at 
 least doesn't seem to have anything for windows in phobos 
 except charset.
When in C you would `#include <foo.h>`, in D you can `import core.sys.windows.foo;`, then just use it exactly like from C.
Jan 25
parent reply Igor <Vladamir.I google.com> writes:
On Monday, 25 January 2016 at 18:18:48 UTC, Vladimir Panteleev 
wrote:
 On Monday, 25 January 2016 at 18:09:47 UTC, Igor wrote:
 On Monday, 25 January 2016 at 02:21:49 UTC, Rikki Cattermole 
 wrote:
 On 25/01/16 2:46 PM, Igor wrote:
 When will the proper Win API be included in D? About how 
 long(months,
 years?)? Does it support seamless narrow and wide characters?

 I am not referring to the defunct win32 support already 
 included.
You mean the MingW based bindings that is in 2.070? https://github.com/D-Programming-Language/druntime/tree/v2.070.0-b2/src/core/sys/windows The only issue is for -m32 with import libs.
I've included the .def files that came with the Win32 bindings, and added them to the build, so many import libs will be supported already.
 How do I use it? I can't find any docs on it(The D page, at 
 least doesn't seem to have anything for windows in phobos 
 except charset.
When in C you would `#include <foo.h>`, in D you can `import core.sys.windows.foo;`, then just use it exactly like from C.
Where are the docs for this? http://dlang.org/phobos-prerelease/index.html doesn't show anything about sys in core. I remember seeing somewhere that win32 api was included in dmd but that it wasn't working and was suppose to be updated. I would like to try it out but I can't find any working information about it. If I add `import core.sys.windows;` Dmd says `Error: module windows is in file 'core\sys\windows.d' which cannot be read`. I am using DMD Beta 2.070.0-b2 Thanks.
Jan 25
next sibling parent reply Vladimir Panteleev <thecybershadow.lists gmail.com> writes:
On Monday, 25 January 2016 at 18:34:30 UTC, Igor wrote:
 On Monday, 25 January 2016 at 18:18:48 UTC, Vladimir Panteleev 
 wrote:
 On Monday, 25 January 2016 at 18:09:47 UTC, Igor wrote:
 On Monday, 25 January 2016 at 02:21:49 UTC, Rikki Cattermole 
 wrote:
 On 25/01/16 2:46 PM, Igor wrote:
 When will the proper Win API be included in D? About how 
 long(months,
 years?)? Does it support seamless narrow and wide 
 characters?

 I am not referring to the defunct win32 support already 
 included.
You mean the MingW based bindings that is in 2.070? https://github.com/D-Programming-Language/druntime/tree/v2.070.0-b2/src/core/sys/windows The only issue is for -m32 with import libs.
I've included the .def files that came with the Win32 bindings, and added them to the build, so many import libs will be supported already.
 How do I use it? I can't find any docs on it(The D page, at 
 least doesn't seem to have anything for windows in phobos 
 except charset.
When in C you would `#include <foo.h>`, in D you can `import core.sys.windows.foo;`, then just use it exactly like from C.
Where are the docs for this?
There currently aren't any.
 http://dlang.org/phobos-prerelease/index.html

 doesn't show anything about sys in core.
The core.sys package mirrors various C system headers. As such, you can consult the C documentation instead. Though I agree, it would be nice to have at least an overview for each module. Feel free to file a bug or contribute.
 I remember seeing somewhere that win32 api was included in dmd 
 but that it wasn't working and was suppose to be updated. I 
 would like to try it out but I can't find any working 
 information about it.

 If I add `import core.sys.windows;`

 Dmd says `Error: module windows is in file 'core\sys\windows.d' 
 which cannot be read`.

 I am using DMD Beta 2.070.0-b2
core.sys.windows is a package (without a package.d), so you can't import it directly. You probably want to import core.sys.windows.windows, that will import most common headers (as described above, it is the equivalent of "#include <windows.h>").
Jan 25
parent Igor <Vladamir.I google.com> writes:
On Monday, 25 January 2016 at 18:40:14 UTC, Vladimir Panteleev 
wrote:
 On Monday, 25 January 2016 at 18:34:30 UTC, Igor wrote:
 [...]
There currently aren't any.
 [...]
The core.sys package mirrors various C system headers. As such, you can consult the C documentation instead. Though I agree, it would be nice to have at least an overview for each module. Feel free to file a bug or contribute.
 [...]
core.sys.windows is a package (without a package.d), so you can't import it directly. You probably want to import core.sys.windows.windows, that will import most common headers (as described above, it is the equivalent of "#include <windows.h>").
Thanks. I see how it works now.
Jan 25
prev sibling parent Adam D. Ruppe <destructionator gmail.com> writes:
On Monday, 25 January 2016 at 18:34:30 UTC, Igor wrote:
 Where are the docs for this?
There's a little bit on my dpldocs.info: http://dpldocs.info/experimental-docs/core.sys.windows.windows.html But it doesn't list much because the source doesn't document most the functions. However, since they are the same as C, the MSDN docs work.
Jan 25