Showing with 10,051 additions and 9,846 deletions.
  1. +2 −1 .gitignore
  2. +14 −1 changelog.dd
  3. +12 −10 src/core/sys/windows/accctrl.d
  4. +2 −0 src/core/sys/windows/aclapi.d
  5. +5 −5 src/core/sys/windows/aclui.d
  6. +3 −3 src/core/sys/windows/basetsd.d
  7. +27 −25 src/core/sys/windows/commctrl.d
  8. +5 −3 src/core/sys/windows/commdlg.d
  9. +2 −0 src/core/sys/windows/cpl.d
  10. +4 −2 src/core/sys/windows/custcntl.d
  11. +3 −3 src/core/sys/windows/dbghelp.d
  12. +76 −10 src/core/sys/windows/dbghelp_types.d
  13. +2 −0 src/core/sys/windows/dbt.d
  14. +3 −1 src/core/sys/windows/ddeml.d
  15. +3 −3 src/core/sys/windows/dhcpcsdk.d
  16. +2 −0 src/core/sys/windows/errorrep.d
  17. +39 −37 src/core/sys/windows/imagehlp.d
  18. +259 −257 src/core/sys/windows/imm.d
  19. +2 −0 src/core/sys/windows/intshcut.d
  20. +3 −3 src/core/sys/windows/ipexport.d
  21. +2 −2 src/core/sys/windows/iprtrmib.d
  22. +2 −2 src/core/sys/windows/iptypes.d
  23. +201 −201 src/core/sys/windows/lmaccess.d
  24. +14 −14 src/core/sys/windows/lmalert.d
  25. +7 −7 src/core/sys/windows/lmat.d
  26. +96 −96 src/core/sys/windows/lmaudit.d
  27. +2 −2 src/core/sys/windows/lmbrowsr.d
  28. +17 −17 src/core/sys/windows/lmchdev.d
  29. +53 −51 src/core/sys/windows/lmcons.d
  30. +183 −183 src/core/sys/windows/lmerrlog.d
  31. +3 −3 src/core/sys/windows/lmmsg.d
  32. +10 −10 src/core/sys/windows/lmremutl.d
  33. +22 −22 src/core/sys/windows/lmrepl.d
  34. +244 −244 src/core/sys/windows/lmserver.d
  35. +33 −33 src/core/sys/windows/lmshare.d
  36. +1 −1 src/core/sys/windows/lmstats.d
  37. +92 −92 src/core/sys/windows/lmsvc.d
  38. +1 −1 src/core/sys/windows/lmuse.d
  39. +2 −0 src/core/sys/windows/lzexpand.d
  40. +19 −19 src/core/sys/windows/mapi.d
  41. +3 −3 src/core/sys/windows/mciavi.d
  42. +4 −4 src/core/sys/windows/mcx.d
  43. +1 −1 src/core/sys/windows/mgmtapi.d
  44. +717 −715 src/core/sys/windows/mmsystem.d
  45. +4 −2 src/core/sys/windows/msacm.d
  46. +10 −10 src/core/sys/windows/mshtml.d
  47. +2 −2 src/core/sys/windows/mswsock.d
  48. +3 −3 src/core/sys/windows/nb30.d
  49. +12 −10 src/core/sys/windows/nddeapi.d
  50. +2 −0 src/core/sys/windows/nspapi.d
  51. +1 −1 src/core/sys/windows/ntdef.d
  52. +4 −2 src/core/sys/windows/ntldap.d
  53. +60 −57 src/core/sys/windows/ntsecapi.d
  54. +42 −42 src/core/sys/windows/oaidl.d
  55. +37 −37 src/core/sys/windows/objbase.d
  56. +3 −3 src/core/sys/windows/objidl.d
  57. +2 −0 src/core/sys/windows/odbcinst.d
  58. +5 −4 src/core/sys/windows/ole.d
  59. +6 −6 src/core/sys/windows/ole2.d
  60. +2 −2 src/core/sys/windows/ole2ver.d
  61. +3 −1 src/core/sys/windows/oleacc.d
  62. +62 −62 src/core/sys/windows/oleauto.d
  63. +25 −25 src/core/sys/windows/olectl.d
  64. +280 −278 src/core/sys/windows/oledlg.d
  65. +1 −1 src/core/sys/windows/oleidl.d
  66. +1 −1 src/core/sys/windows/pbt.d
  67. +2 −2 src/core/sys/windows/powrprof.d
  68. +3 −1 src/core/sys/windows/prsht.d
  69. +2 −0 src/core/sys/windows/psapi.d
  70. +137 −135 src/core/sys/windows/ras.d
  71. +9 −7 src/core/sys/windows/rasdlg.d
  72. +13 −13 src/core/sys/windows/rassapi.d
  73. +105 −105 src/core/sys/windows/regstr.d
  74. +242 −240 src/core/sys/windows/richedit.d
  75. +1 −1 src/core/sys/windows/richole.d
  76. +53 −51 src/core/sys/windows/rpcdce.d
  77. +3 −1 src/core/sys/windows/rpcdce2.d
  78. +15 −13 src/core/sys/windows/rpcdcep.d
  79. +17 −17 src/core/sys/windows/rpcndr.d
  80. +12 −10 src/core/sys/windows/rpcnsi.d
  81. +4 −4 src/core/sys/windows/schannel.d
  82. +2 −0 src/core/sys/windows/secext.d
  83. +15 −13 src/core/sys/windows/setupapi.d
  84. +16 −14 src/core/sys/windows/shellapi.d
  85. +1 −1 src/core/sys/windows/shldisp.d
  86. +165 −163 src/core/sys/windows/shlobj.d
  87. +16 −14 src/core/sys/windows/shlwapi.d
  88. +2 −2 src/core/sys/windows/snmp.d
  89. +321 −321 src/core/sys/windows/sql.d
  90. +1,121 −1,121 src/core/sys/windows/sqlext.d
  91. +3 −1 src/core/sys/windows/sqltypes.d
  92. +17 −15 src/core/sys/windows/sqlucode.d
  93. +2 −0 src/core/sys/windows/sspi.d
  94. +6 −6 src/core/sys/windows/stacktrace.d
  95. +10 −10 src/core/sys/windows/stat.d
  96. +17 −17 src/core/sys/windows/subauth.d
  97. +6 −3 src/core/sys/windows/tlhelp32.d
  98. +4,062 −4,062 src/core/sys/windows/uuid.d
  99. +89 −87 src/core/sys/windows/vfw.d
  100. +2 −0 src/core/sys/windows/w32api.d
  101. +49 −47 src/core/sys/windows/winbase.d
  102. +1 −1 src/core/sys/windows/winber.d
  103. +3 −1 src/core/sys/windows/wincon.d
  104. +7 −4 src/core/sys/windows/wincrypt.d
  105. +7 −2 src/core/sys/windows/windef.d
  106. +145 −143 src/core/sys/windows/wingdi.d
  107. +59 −57 src/core/sys/windows/wininet.d
  108. +4 −4 src/core/sys/windows/winioctl.d
  109. +8 −6 src/core/sys/windows/winldap.d
  110. +13 −11 src/core/sys/windows/winnetwk.d
  111. +17 −15 src/core/sys/windows/winnls.d
  112. +155 −153 src/core/sys/windows/winnt.d
  113. +68 −68 src/core/sys/windows/winperf.d
  114. +3 −1 src/core/sys/windows/winreg.d
  115. +9 −9 src/core/sys/windows/winsock2.d
  116. +231 −229 src/core/sys/windows/winspool.d
  117. +7 −5 src/core/sys/windows/winsvc.d
  118. +2 −0 src/core/sys/windows/winuser.d
  119. +2 −0 src/core/sys/windows/winver.d
  120. +2 −0 src/core/sys/windows/wtsapi32.d
  121. +4 −4 src/core/sys/windows/wtypes.d
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ druntime.json
trace.def
trace.log
Makefile
/errno_c.obj
/errno_c*.obj
/msvc*.obj
make
15 changes: 14 additions & 1 deletion changelog.dd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ $(COMMENT Pending changelog for 2.067.0.
$(BUGSTITLE Library Changes,

$(LI $(RELATIVE_LINK2 TypeInfo.initializer, `TypeInfo.init` has been renamed to
`TypeInfo.initializer`.))
`TypeInfo.initializer`.)
)
$(LI $(RELATIVE_LINK2 core.sys.windows, The `core.sys.windows` package has been
greatly expanded.)
)
)

Expand All @@ -28,6 +31,16 @@ $(LI $(LNAME2 TypeInfo.initializer, `TypeInfo.init` has been renamed to
2.074.0 release, so that the type property `init` takes over.
)
)

$(LI $(LNAME2 core.sys.windows, The `core.sys.windows` package has been
greatly expanded.)

$(P The `core.sys.windows` package now contains a considerably more
comprehensive set of Windows API bindings. The package has been
adapted from $(WEB github.com/smjgordon/bindings, Stewart Gordon's
bindings), which were originally adapted from the MinGW project.
)
)
)


Expand Down
22 changes: 12 additions & 10 deletions src/core/sys/windows/accctrl.d
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@
module core.sys.windows.accctrl;
version (Windows):

version (ANSI) {} else version = Unicode;

private import core.sys.windows.basetyps, core.sys.windows.w32api, core.sys.windows.winbase, core.sys.windows.windef;

// FIXME: check types and grouping of constants
// FIXME: check Windows version support

alias LocalFree AccFree;

const uint
enum uint
ACTRL_RESERVED = 0x00000000,
ACTRL_ACCESS_PROTECTED = 0x00000001,
ACTRL_ACCESS_ALLOWED = 0x00000001,
Expand All @@ -32,7 +34,7 @@ const uint
ACTRL_SYNCHRONIZE = 0x80000000,
ACTRL_STD_RIGHTS_ALL = 0xf8000000;

const uint
enum uint
ACTRL_FILE_READ = 0x00000001,
ACTRL_FILE_WRITE = 0x00000002,
ACTRL_FILE_APPEND = 0x00000004,
Expand All @@ -43,14 +45,14 @@ const uint
ACTRL_FILE_WRITE_ATTRIB = 0x00000100,
ACTRL_FILE_CREATE_PIPE = 0x00000200;

const uint
enum uint
ACTRL_DIR_LIST = 0x00000001,
ACTRL_DIR_CREATE_OBJECT = 0x00000002,
ACTRL_DIR_CREATE_CHILD = 0x00000004,
ACTRL_DIR_DELETE_CHILD = 0x00000040,
ACTRL_DIR_TRAVERSE = 0x00000020;

const uint
enum uint
ACTRL_KERNEL_TERMINATE = 0x00000001,
ACTRL_KERNEL_THREAD = 0x00000002,
ACTRL_KERNEL_VM = 0x00000004,
Expand All @@ -68,14 +70,14 @@ const uint
ACTRL_KERNEL_IMPERSONATE = 0x00004000,
ACTRL_KERNEL_DIMPERSONATE = 0x00008000;

const uint
enum uint
ACTRL_PRINT_SADMIN = 0x00000001,
ACTRL_PRINT_SLIST = 0x00000002,
ACTRL_PRINT_PADMIN = 0x00000004,
ACTRL_PRINT_PUSE = 0x00000008,
ACTRL_PRINT_JADMIN = 0x00000010;

const uint
enum uint
ACTRL_SVC_GET_INFO = 0x00000001,
ACTRL_SVC_SET_INFO = 0x00000002,
ACTRL_SVC_STATUS = 0x00000004,
Expand All @@ -86,15 +88,15 @@ const uint
ACTRL_SVC_INTERROGATE = 0x00000080,
ACTRL_SVC_UCONTROL = 0x00000100;

const uint
enum uint
ACTRL_REG_QUERY = 0x00000001,
ACTRL_REG_SET = 0x00000002,
ACTRL_REG_CREATE_CHILD = 0x00000004,
ACTRL_REG_LIST = 0x00000008,
ACTRL_REG_NOTIFY = 0x00000010,
ACTRL_REG_LINK = 0x00000020;

const uint
enum uint
ACTRL_WIN_CLIPBRD = 0x00000001,
ACTRL_WIN_GLOBAL_ATOMS = 0x00000002,
ACTRL_WIN_CREATE = 0x00000004,
Expand All @@ -112,15 +114,15 @@ enum : uint {

const TCHAR[] ACCCTRL_DEFAULT_PROVIDER = "Windows NT Access Provider";

const uint
enum uint
TRUSTEE_ACCESS_ALLOWED = 0x00000001,
TRUSTEE_ACCESS_READ = 0x00000002,
TRUSTEE_ACCESS_WRITE = 0x00000004,
TRUSTEE_ACCESS_EXPLICIT = 0x00000001,
TRUSTEE_ACCESS_READ_WRITE = 0x00000006,
TRUSTEE_ACCESS_ALL = 0xFFFFFFFF;

const uint
enum uint
NO_INHERITANCE = 0x0,
SUB_OBJECTS_ONLY_INHERIT = 0x1,
SUB_CONTAINERS_ONLY_INHERIT = 0x2,
Expand Down
2 changes: 2 additions & 0 deletions src/core/sys/windows/aclapi.d
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
*/
module core.sys.windows.aclapi;
version (Windows):

version (ANSI) {} else version = Unicode;
pragma(lib, "advapi32");

import core.sys.windows.windows, core.sys.windows.accctrl;
Expand Down
10 changes: 5 additions & 5 deletions src/core/sys/windows/aclui.d
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct SI_OBJECT_INFO {
alias SI_OBJECT_INFO* PSI_OBJECT_INFO;

// values for SI_OBJECT_INFO.dwFlags
const DWORD
enum DWORD
SI_EDIT_PERMS = 0x00000000,
SI_EDIT_OWNER = 0x00000001,
SI_EDIT_AUDITS = 0x00000002,
Expand Down Expand Up @@ -61,23 +61,23 @@ const DWORD
| SI_EDIT_AUDITS;

struct SI_ACCESS {
const(GUID)* pguid;
const(GUID)* pguid;
ACCESS_MASK mask;
LPCWSTR pszName;
DWORD dwFlags;
}
alias SI_ACCESS* PSI_ACCESS;

// values for SI_ACCESS.dwFlags
const DWORD
enum DWORD
SI_ACCESS_SPECIFIC = 0x00010000,
SI_ACCESS_GENERAL = 0x00020000,
SI_ACCESS_CONTAINER = 0x00040000,
SI_ACCESS_PROPERTY = 0x00080000;


struct SI_INHERIT_TYPE {
const(GUID)* pguid;
const(GUID)* pguid;
ULONG dwFlags;
LPCWSTR pszName;
}
Expand All @@ -94,7 +94,7 @@ enum SI_PAGE_TYPE {
SI_PAGE_OWNER
}

const uint PSPCB_SI_INITDIALOG = WM_USER + 1;
enum uint PSPCB_SI_INITDIALOG = WM_USER + 1;

interface ISecurityInformation : IUnknown {
HRESULT GetObjectInformation(PSI_OBJECT_INFO);
Expand Down
6 changes: 3 additions & 3 deletions src/core/sys/windows/basetsd.d
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ template TypeDef(T) {

alias TypeDef!(void*) HANDLE;
/+struct HANDLE {
const(void)* h;
const(void)* h;
alias h this;
}+/

Expand All @@ -51,7 +51,7 @@ alias HANDLE* PHANDLE, LPHANDLE;

version (Win64) {
alias long __int3264;
const ulong ADDRESS_TAG_BIT = 0x40000000000;
enum ulong ADDRESS_TAG_BIT = 0x40000000000;

alias long INT_PTR, LONG_PTR;
alias long* PINT_PTR, PLONG_PTR;
Expand Down Expand Up @@ -79,7 +79,7 @@ version (Win64) {

} else {
alias int __int3264;
const uint ADDRESS_TAG_BIT = 0x80000000;
enum uint ADDRESS_TAG_BIT = 0x80000000;

alias int INT_PTR, LONG_PTR;
alias int* PINT_PTR, PLONG_PTR;
Expand Down
52 changes: 27 additions & 25 deletions src/core/sys/windows/commctrl.d
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
*/
module core.sys.windows.commctrl;
version (Windows):

version (ANSI) {} else version = Unicode;
pragma(lib, "comctl32");

private import core.sys.windows.w32api, core.sys.windows.windef, core.sys.windows.winuser;
Expand All @@ -16,7 +18,7 @@ private import core.sys.windows.objfwd; // for LPSTREAM

import core.sys.windows.prsht;

const COMCTL32_VERSION = 6;
enum COMCTL32_VERSION = 6;

const TCHAR[]
DRAGLISTMSGSTRING = "commctrl_DragListMsg",
Expand Down Expand Up @@ -102,7 +104,7 @@ enum {
CBENF_DROPDOWN // = 4
}

const CBEMAXSTRLEN = 260;
enum CBEMAXSTRLEN = 260;

enum {
DL_BEGINDRAG = 1157,
Expand Down Expand Up @@ -147,9 +149,9 @@ enum {
PGS_DRAGNDROP = 0x00000004
}

const CMB_MASKED = 2;
enum CMB_MASKED = 2;

const MINSYSCOMMAND = SC_SIZE;
enum MINSYSCOMMAND = SC_SIZE;

enum {
SBT_OWNERDRAW = 0x1000,
Expand Down Expand Up @@ -591,7 +593,7 @@ static if (_WIN32_IE >= 0x400) {
}
}

const HINST_COMMCTRL = cast(HINSTANCE) (-1);
enum HINST_COMMCTRL = cast(HINSTANCE) (-1);

enum {
IDB_STD_SMALL_COLOR,
Expand Down Expand Up @@ -781,7 +783,7 @@ static if (_WIN32_WINNT >= 0x600) {
}
}

const TBBF_LARGE = 1;
enum TBBF_LARGE = 1;

enum {
TBN_GETBUTTONINFOA = TBN_FIRST -0,
Expand Down Expand Up @@ -967,8 +969,8 @@ enum {
TTN_POP = TTN_FIRST-2
}

const UD_MAXVAL = 0x7fff;
const UD_MINVAL = -UD_MAXVAL;
enum UD_MAXVAL = 0x7fff;
enum UD_MINVAL = -UD_MAXVAL;

enum {
UDN_DELTAPOS = UDN_FIRST-1,
Expand Down Expand Up @@ -1449,10 +1451,10 @@ enum {
LVIS_STATEIMAGEMASK = 0xF000
}

const LPWSTR LPSTR_TEXTCALLBACKW = cast(LPWSTR) -1;
const LPSTR LPSTR_TEXTCALLBACKA = cast(LPSTR) -1;
enum LPWSTR LPSTR_TEXTCALLBACKW = cast(LPWSTR) -1;
enum LPSTR LPSTR_TEXTCALLBACKA = cast(LPSTR) -1;

const I_IMAGECALLBACK = -1;
enum I_IMAGECALLBACK = -1;

static if(_WIN32_IE >= 0x400) {
enum {
Expand Down Expand Up @@ -1743,13 +1745,13 @@ mixin DECLARE_HANDLE!("HIMAGELIST");

version(Win64)
{
const HTREEITEM
enum HTREEITEM
TVI_ROOT = cast(HTREEITEM) cast(ULONG_PTR)-0x10000,
TVI_FIRST = cast(HTREEITEM) cast(ULONG_PTR)-0xffff,
TVI_LAST = cast(HTREEITEM) cast(ULONG_PTR)-0xfffe,
TVI_SORT = cast(HTREEITEM) cast(ULONG_PTR)-0xfffd;
} else {
const HTREEITEM
enum HTREEITEM
TVI_ROOT = cast(HTREEITEM) 0xFFFF0000,
TVI_FIRST = cast(HTREEITEM) 0xFFFF0001,
TVI_LAST = cast(HTREEITEM) 0xFFFF0002,
Expand Down Expand Up @@ -2617,7 +2619,7 @@ static if(_WIN32_WINNT >= 0x600) {
BCN_DROPDOWN = BCN_FIRST + 0x0002,
}

const HIMAGELIST BCCL_NOGLYPH = cast(HIMAGELIST)-1;
enum HIMAGELIST BCCL_NOGLYPH = cast(HIMAGELIST)-1;

struct BUTTON_SPLITINFO
{
Expand Down Expand Up @@ -2728,8 +2730,8 @@ static if (_WIN32_WINNT >= 0x501) {
LM_GETIDEALSIZE = LM_GETIDEALHEIGHT,
}

const size_t MAX_LINKID_TEXT = 48;
const size_t L_MAX_URL_LENGTH = 2084;
enum size_t MAX_LINKID_TEXT = 48;
enum size_t L_MAX_URL_LENGTH = 2084;
}


Expand Down Expand Up @@ -3456,7 +3458,7 @@ static if (_WIN32_WINNT >= 0x501) {
void* lpReserved;
}

const size_t
enum size_t
TTTOOLINFOA_V1_SIZE = TOOLINFOA.lParam.offsetof,
TTTOOLINFOW_V1_SIZE = TOOLINFOW.lParam.offsetof,
TTTOOLINFOA_V2_SIZE = TOOLINFOA.lpReserved.offsetof,
Expand Down Expand Up @@ -3486,7 +3488,7 @@ static if (_WIN32_WINNT >= 0x501) {
LPARAM lParam;
}

const size_t
enum size_t
TTTOOLINFOA_V1_SIZE = TOOLINFOA.lParam.offsetof,
TTTOOLINFOW_V1_SIZE = TOOLINFOW.lParam.offsetof,
TTTOOLINFOA_V2_SIZE = TOOLINFOA.sizeof,
Expand All @@ -3512,7 +3514,7 @@ static if (_WIN32_WINNT >= 0x501) {
LPWSTR lpszText;
}

const size_t
enum size_t
TTTOOLINFOA_V1_SIZE = TOOLINFOA.sizeof,
TTTOOLINFOW_V1_SIZE = TOOLINFOW.sizeof;
}
Expand Down Expand Up @@ -6268,13 +6270,13 @@ static if (_WIN32_WINNT >= 0x501) {
}
alias EDITBALLOONTIP* PEDITBALLOONTIP;

const EM_SETCUEBANNER = ECM_FIRST + 1;
const EM_GETCUEBANNER = ECM_FIRST + 2;
const EM_SHOWBALLOONTIP = ECM_FIRST + 3;
const EM_HIDEBALLOONTIP = ECM_FIRST + 4;
enum EM_SETCUEBANNER = ECM_FIRST + 1;
enum EM_GETCUEBANNER = ECM_FIRST + 2;
enum EM_SHOWBALLOONTIP = ECM_FIRST + 3;
enum EM_HIDEBALLOONTIP = ECM_FIRST + 4;
}

static if (_WIN32_WINNT >= 0x600) {
const EM_SETHILITE = ECM_FIRST + 5;
const EM_GETHILITE = ECM_FIRST + 6;
enum EM_SETHILITE = ECM_FIRST + 5;
enum EM_GETHILITE = ECM_FIRST + 6;
}
Loading