www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Question about win32, windows.d, user32 and kernel32

reply nobody <nobody mailinator.com> writes:
It seems to me as if std.c.windows.windows has the stuff which describes data 
structures and functions for kernel32. However I just had to pull some info out 
of the dmc include folder to work with clipboard related functions. I am
curious 
why dmd links with user32 and kernel32 but does not seem to have a D version of 
winuser.h?
Aug 22 2006
parent reply Stewart Gordon <smjg_1998 yahoo.com> writes:
nobody wrote:
 It seems to me as if std.c.windows.windows has the stuff which describes 
 data structures and functions for kernel32. However I just had to pull 
 some info out of the dmc include folder to work with clipboard related 
 functions. I am curious why dmd links with user32 and kernel32 but does 
 not seem to have a D version of winuser.h?

Because translating the Win32 headers is a work in progress. http://www.prowiki.org/wiki4d/wiki.cgi?WindowsAPI 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.
Aug 23 2006
parent reply nobody <nobody mailinator.com> writes:
Stewart Gordon wrote:
 nobody wrote:
 It seems to me as if std.c.windows.windows has the stuff which 
 describes data structures and functions for kernel32. However I just 
 had to pull some info out of the dmc include folder to work with 
 clipboard related functions. I am curious why dmd links with user32 
 and kernel32 but does not seem to have a D version of winuser.h?

Because translating the Win32 headers is a work in progress. http://www.prowiki.org/wiki4d/wiki.cgi?WindowsAPI Stewart.

Thanks for the reply and the link. I can understand that translating the full collection of Win32 headers is a large task. I was curious why winuser in particular was not translated if kernel32 and user32 are linked by default for every build.
Aug 23 2006
parent reply Don Clugston <dac nospam.com.au> writes:
nobody wrote:
 Stewart Gordon wrote:
 nobody wrote:
 It seems to me as if std.c.windows.windows has the stuff which 
 describes data structures and functions for kernel32. However I just 
 had to pull some info out of the dmc include folder to work with 
 clipboard related functions. I am curious why dmd links with user32 
 and kernel32 but does not seem to have a D version of winuser.h?

Because translating the Win32 headers is a work in progress. http://www.prowiki.org/wiki4d/wiki.cgi?WindowsAPI Stewart.

Thanks for the reply and the link. I can understand that translating the full collection of Win32 headers is a large task. I was curious why winuser in particular was not translated if kernel32 and user32 are linked by default for every build.

I believe the windows headers that come with D are the ones which were needed for Empire to compile. I think they were expanded a bit beyond that, but it explains why the selection of functions is a bit odd; they were added as required.
Aug 23 2006
parent reply nobody <nobody mailinator.com> writes:
Don Clugston wrote:
 nobody wrote:
 Stewart Gordon wrote:
 nobody wrote:
 It seems to me as if std.c.windows.windows has the stuff which 
 describes data structures and functions for kernel32. However I just 
 had to pull some info out of the dmc include folder to work with 
 clipboard related functions. I am curious why dmd links with user32 
 and kernel32 but does not seem to have a D version of winuser.h?

Because translating the Win32 headers is a work in progress. http://www.prowiki.org/wiki4d/wiki.cgi?WindowsAPI Stewart.

Thanks for the reply and the link. I can understand that translating the full collection of Win32 headers is a large task. I was curious why winuser in particular was not translated if kernel32 and user32 are linked by default for every build.

I believe the windows headers that come with D are the ones which were needed for Empire to compile. I think they were expanded a bit beyond that, but it explains why the selection of functions is a bit odd; they were added as required.

That would certainly make sense. Thanks!
Aug 23 2006
parent Stewart Gordon <smjg_1998 yahoo.com> writes:
nobody wrote:
 Don Clugston wrote:

 I believe the windows headers that come with D are the ones which were 
 needed for Empire to compile. I think they were expanded a bit beyond 
 that, but it explains why the selection of functions is a bit odd; 
 they were added as required.

That would certainly make sense. Thanks!

Indeed, std.c.windows.windows doesn't correspond to any particular standard Windows header. It's just Walter's practice of adding stuff as and when he needs it. However, it appears that Empire was written around std.c.windows.windows, rather than the other way round. In particular, for some reason I never established the old Empire D code worked around the (since fixed) broken declarations of DLGPROC et al. 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.
Aug 25 2006