April 21, 2006
> The current status is visible from the Wiki web page, and from the dsource bindings repository. In summary:

Sorry just seen this page from one of other posts in this thread.

> 
> * Almost everything included by windows.h has now been converted. The only exceptions are the rpc stuff, which requires a big chunk of the COM code to be converted.

Then this is a massive chunk done, but COM is a dog to work with in any language, so converting this might be challenging to say the least ;)

> * Some of the macros and bit fields in structs haven't been converted yet -- but most have.

Is this due to being complicated or just a lower priority?

> * It's not very well tested yet.
Difficult to test I guess without much to test against a kind of chicken and egg situation

> * I believe that it's very close to being a viable alternative to the Windows header in Phobos. Almost all of the functions in Phobos are included.

Pure D Headers would be useful and a good stead for building a GUI toolkit?

I take it all the blanks on the wiki are todo?
Is it just a case of editing wiki where I take a file?

DBloke
April 21, 2006
DBloke wrote:
> 
>> The current status is visible from the Wiki web page, and from the dsource bindings repository. In summary:
> 
> Sorry just seen this page from one of other posts in this thread.
> 
>>
>> * Almost everything included by windows.h has now been converted. The only exceptions are the rpc stuff, which requires a big chunk of the COM code to be converted.
> 
> Then this is a massive chunk done, but COM is a dog to work with in any language, so converting this might be challenging to say the least ;)

Actually, Phobos already has the core elements converted, so it's a matter of copying them across. I've begun playing around with it, but I'm short of time at present.

> 
>> * Some of the macros and bit fields in structs haven't been converted yet -- but most have.
> 
> Is this due to being complicated or just a lower priority?

The priority was to get a draft of everything so that windows.d would compile.
> 
>> * It's not very well tested yet.
> Difficult to test I guess without much to test against a kind of chicken and egg situation

A great help would be a tool that parsed a D file and extracted the names of all of the functions. With that, we could make a file that just
consisted of

void main()
{
   auto f1 = &CreateWindowA;
   auto f2 = &MessageBoxA;
   auto f3 = &CreateDialogParamA;
:
:
}

If we had that, we could test that every function declaration in the headers actually existed in the implib, which would be a tremendous step. (and would be useful for *all* D conversions of C header files!) Probably one of the D parsing libraries could do this without much trouble -- any volunteers?

> 
>> * I believe that it's very close to being a viable alternative to the Windows header in Phobos. Almost all of the functions in Phobos are included.
> 
> Pure D Headers would be useful and a good stead for building a GUI toolkit?
> 
> I take it all the blanks on the wiki are todo?
> Is it just a case of editing wiki where I take a file?

Correct. It's particularly important for Stewart, who hasn't been able to get access to the repository. Once a file is in the repository, it's fair game for anyone, because it's easy to merge changes in.
May 09, 2006
> A great help would be a tool that parsed a D file and extracted the names of all of the functions. With that, we could make a file that just
> consisted of
> 
> void main()
> {
>    auto f1 = &CreateWindowA;
>    auto f2 = &MessageBoxA;
>    auto f3 = &CreateDialogParamA;
> :
> :
> }
> 
So you just want a utility that takes a D file as input scans it and dumps out a text file with all functions in that file?

E.G.

File ABC.d contains

void FuncA(int a);
int FuncX ();
real FuncZ(int a, int b);

Output File ABC.txt
FuncA
FuncX
FuncZ

If you give me some more info, I will give it a go, and maybe create a file that calls these functions too as well as just text files, but I need more specifics

DBloke
May 10, 2006
DBloke wrote:
> 
>> A great help would be a tool that parsed a D file and extracted the names of all of the functions. With that, we could make a file that just
>> consisted of
>>
>> void main()
>> {
>>    auto f1 = &CreateWindowA;
>>    auto f2 = &MessageBoxA;
>>    auto f3 = &CreateDialogParamA;
>> :
>> :
>> }
>>
> So you just want a utility that takes a D file as input scans it and dumps out a text file with all functions in that file?
> 
> E.G.
> 
> File ABC.d contains
> 
> void FuncA(int a);
> int FuncX ();
> real FuncZ(int a, int b);
> 
> Output File ABC.txt
> FuncA
> FuncX
> FuncZ

That's exactly right.
> 
> If you give me some more info, I will give it a go, and maybe create a file that calls these functions too as well as just text files, but I need more specifics

Ultimately we want to create testABC.txt, which is:

import ABC;

void main()
{
  auto f1 = &ABC.FuncA;
  auto f2 = &ABC.FuncX;
  auto f3 = &ABC.FuncZ;
}

If this links, we know the definitions are correct.
-Don.
May 10, 2006
Don Clugston wrote:
> DBloke wrote:
<snip>
>> So you just want a utility that takes a D file as input scans it and dumps out a text file with all functions in that file?
<snip>
>> Output File ABC.txt
>> FuncA
>> FuncX
>> FuncZ
> 
> That's exactly right.

Why not make the program generate the D code straight off?

>> If you give me some more info, I will give it a go, and maybe create a file that calls these functions too as well as just text files, but I need more specifics
> 
> Ultimately we want to create testABC.txt, which is:
> 
> import ABC;
> 
> void main()
> {
>   auto f1 = &ABC.FuncA;
>   auto f2 = &ABC.FuncX;
>   auto f3 = &ABC.FuncZ;
> }

I'd thought it had to have a .d extension to work.

Stewart.

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d- s:-@ C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++++ h-- r-- !y
------END GEEK CODE BLOCK------

My e-mail is valid but not my primary mailbox.  Please keep replies on the 'group where everyone may benefit.
May 10, 2006
Stewart Gordon wrote:
> Don Clugston wrote:
>> DBloke wrote:
> <snip>
>>> So you just want a utility that takes a D file as input scans it and dumps out a text file with all functions in that file?
> <snip>
>>> Output File ABC.txt
>>> FuncA
>>> FuncX
>>> FuncZ
>>
>> That's exactly right.
> 
> Why not make the program generate the D code straight off?

Of course. Given a program that creates the text file, it's trivial to modify it to make the D code. It was just easier to explain the text file...

>>> If you give me some more info, I will give it a go, and maybe create a file that calls these functions too as well as just text files, but I need more specifics
>>
>> Ultimately we want to create testABC.txt, which is:
>>
>> import ABC;
>>
>> void main()
>> {
>>   auto f1 = &ABC.FuncA;
>>   auto f2 = &ABC.FuncX;
>>   auto f3 = &ABC.FuncZ;
>> }
> 
> I'd thought it had to have a .d extension to work.

Yes. typo.

> 
> Stewart.
> 
May 16, 2006
Hi Stewart,
How it meant to be built? Currently I need to compile objects in bind/win32 dir, and link against them from command line.
Not too convenient, but maybe I missed something.
Could you comment?

--
serg.
May 17, 2006
Serg Kovrov wrote:
> Hi Stewart,
> How it meant to be built? Currently I need to compile objects in bind/win32 dir, and link against them from command line.
> Not too convenient, but maybe I missed something.
> Could you comment?
> 
> -- 
> serg.

No work has been put into packaging it yet. Here's what I've done:
I have a directory c:\dlibs on my root, and I've put win32 into it.
I've added the c:\dlibs directory to my path, and replaced std.c.windows.windows with the following:
------------
module std.c.windows.windows;

import win32.windows;
-----------
If you use functions that aren't in the import libs supplied with DMD, you'll need to obtain recent import libs from Microsoft (eg, by downloading the 2005 SDK) and run coffimplib on them.
May 17, 2006
Don Clugston wrote:
<snip>
> If you use functions that aren't in the import libs supplied with DMD, you'll need to obtain recent import libs from Microsoft (eg, by downloading the 2005 SDK) and run coffimplib on them.

Which functions are they?  We ought to do something about this sometime....

Stewart.

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d- s:-@ C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++++ h-- r-- !y
------END GEEK CODE BLOCK------

My e-mail is valid but not my primary mailbox.  Please keep replies on the 'group where everyone may benefit.
May 17, 2006
In article <e4f6a0$2ivj$1@digitaldaemon.com>, Stewart Gordon says...
>
>Don Clugston wrote:
><snip>
>> If you use functions that aren't in the import libs supplied with DMD, you'll need to obtain recent import libs from Microsoft (eg, by downloading the 2005 SDK) and run coffimplib on them.
>
>Which functions are they?  We ought to do something about this sometime....
>
>Stewart.

If there are functions missing in the official DM libs, they might be in these def files in the Bindings project at dsource:

http://www.dsource.org/projects/bindings/wiki/DefFiles

jcc7