diff --git a/druntime/src/core/sys/windows/commctrl.d b/druntime/src/core/sys/windows/commctrl.d index fe4ebbc75d8..073587f01c1 100644 --- a/druntime/src/core/sys/windows/commctrl.d +++ b/druntime/src/core/sys/windows/commctrl.d @@ -5014,7 +5014,7 @@ BOOL Animate_Seek(HWND hwnd, int frame) { return Animate_Play(hwnd, frame, frame, 1); } -extern (Windows) { +extern (Windows) nothrow @nogc { HBITMAP CreateMappedBitmap(HINSTANCE, INT_PTR, UINT, LPCOLORMAP, int); HWND CreateStatusWindowA(LONG, LPCSTR, HWND, UINT); HWND CreateStatusWindowW(LONG, LPCWSTR, HWND, UINT); @@ -5068,7 +5068,7 @@ BOOL DateTime_SetSystemtime(HWND hwnd, WPARAM flag, LPSYSTEMTIME lpSysTime) { cast(LPARAM) lpSysTime); } -extern (Windows) { +extern (Windows) nothrow @nogc { void DrawInsert(HWND, HWND, int); void DrawStatusTextA(HDC, LPRECT, LPCSTR, UINT); void DrawStatusTextW(HDC, LPRECT, LPCWSTR, UINT); @@ -5142,7 +5142,7 @@ static if (_WIN32_IE >= 0x400) { } } -extern (Windows) { +extern (Windows) nothrow @nogc { HDSA DSA_Create(INT, INT); BOOL DSA_Destroy(HDSA); VOID DSA_DestroyCallback(HDSA, PFNDSAENUMCALLBACK, PVOID); @@ -5758,7 +5758,7 @@ BOOL MonthCal_SetRange(HWND w, DWORD f, LPSYSTEMTIME st) { cast(LPARAM) st); } -extern (Windows) BOOL ShowHideMenuCtl(HWND, UINT_PTR, PINT); +extern (Windows) nothrow @nogc BOOL ShowHideMenuCtl(HWND, UINT_PTR, PINT); BOOL TabCtrl_GetItem(HWND w, int i, LPTCITEM p) { return cast(BOOL) SendMessage(w, TCM_GETITEM, i, cast(LPARAM) p); @@ -6069,7 +6069,7 @@ static if (_WIN32_IE >= 0x300) { return cast(BOOL) SendMessage(w, LVM_SETITEMCOUNT, i, cast(LPARAM) f); } - extern (Windows) { + extern (Windows) nothrow @nogc { WINBOOL ImageList_SetImageCount(HIMAGELIST, UINT); WINBOOL ImageList_Copy(HIMAGELIST, int, HIMAGELIST, int, UINT); WINBOOL ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*); diff --git a/druntime/src/core/sys/windows/custcntl.d b/druntime/src/core/sys/windows/custcntl.d index f9234ac4f89..ddac9607382 100644 --- a/druntime/src/core/sys/windows/custcntl.d +++ b/druntime/src/core/sys/windows/custcntl.d @@ -99,6 +99,7 @@ extern (Windows) { alias INT function(DWORD, DWORD, HFONT, LPWSTR) LPFNCCSIZETOTEXTW; alias UINT function(LPCCINFOA) LPFNCCINFOA; alias UINT function(LPCCINFOW) LPFNCCINFOW; +nothrow @nogc: UINT CustomControlInfoA(LPCCINFOA acci); UINT CustomControlInfoW(LPCCINFOW acci); } diff --git a/druntime/src/core/sys/windows/dde.d b/druntime/src/core/sys/windows/dde.d index d9b8bec5152..975c62e42f3 100644 --- a/druntime/src/core/sys/windows/dde.d +++ b/druntime/src/core/sys/windows/dde.d @@ -148,7 +148,7 @@ deprecated struct DDEUP { @property bool fAckReq(bool f) { _bf = cast(ushort) ((_bf & ~0x8000) | (f << 15)); return f; } } -extern (Windows) { +extern (Windows) nothrow @nogc { BOOL DdeSetQualityOfService(HWND, const(SECURITY_QUALITY_OF_SERVICE)*, PSECURITY_QUALITY_OF_SERVICE); BOOL ImpersonateDdeClientWindow(HWND, HWND); diff --git a/druntime/src/core/sys/windows/ddeml.d b/druntime/src/core/sys/windows/ddeml.d index 2e8e3ee25d6..0ff1a3f4f1e 100644 --- a/druntime/src/core/sys/windows/ddeml.d +++ b/druntime/src/core/sys/windows/ddeml.d @@ -332,7 +332,7 @@ struct MONMSGSTRUCT { } alias MONMSGSTRUCT* PMONMSGSTRUCT; -extern (Windows) { +extern (Windows) nothrow @nogc { BOOL DdeAbandonTransaction(DWORD, HCONV, DWORD); PBYTE DdeAccessData(HDDEDATA, PDWORD); HDDEDATA DdeAddData(HDDEDATA, PBYTE, DWORD, DWORD); diff --git a/druntime/src/core/sys/windows/dhcpcsdk.d b/druntime/src/core/sys/windows/dhcpcsdk.d index d21169a7346..6171469c8c7 100644 --- a/druntime/src/core/sys/windows/dhcpcsdk.d +++ b/druntime/src/core/sys/windows/dhcpcsdk.d @@ -45,7 +45,7 @@ struct DHCPCAPI_PARAMS_ARRAY { } alias DHCPCAPI_PARAMS_ARRAY* PDHCPCAPI_PARAMS_ARRAY, LPDHCPCAPI_PARAMS_ARRAY; -extern (Windows) { +extern (Windows) nothrow @nogc { void DhcpCApiCleanup(); DWORD DhcpCApiInitialize(LPDWORD); DWORD DhcpDeRegisterParamChange(DWORD, LPVOID, LPVOID); diff --git a/druntime/src/core/sys/windows/errorrep.d b/druntime/src/core/sys/windows/errorrep.d index 42fad9a39ec..840ea61f3ce 100644 --- a/druntime/src/core/sys/windows/errorrep.d +++ b/druntime/src/core/sys/windows/errorrep.d @@ -29,7 +29,7 @@ enum EFaultRepRetVal { frrvOkHeadless // = 7 } -extern (Windows) { +extern (Windows) nothrow @nogc { BOOL AddERExcludedApplicationA(LPCSTR); BOOL AddERExcludedApplicationW(LPCWSTR); EFaultRepRetVal ReportFault(LPEXCEPTION_POINTERS, DWORD); diff --git a/druntime/src/core/sys/windows/imagehlp.d b/druntime/src/core/sys/windows/imagehlp.d index 68d88d78780..c6d28e68fd1 100644 --- a/druntime/src/core/sys/windows/imagehlp.d +++ b/druntime/src/core/sys/windows/imagehlp.d @@ -295,6 +295,7 @@ extern (Windows) { alias BOOL function(DIGEST_HANDLE refdata, PBYTE pData, DWORD dwLength) DIGEST_FUNCTION; +nothrow @nogc: PIMAGE_NT_HEADERS CheckSumMappedFile(LPVOID, DWORD, LPDWORD, LPDWORD); DWORD MapFileAndCheckSumA(LPSTR, LPDWORD, LPDWORD); DWORD MapFileAndCheckSumW(PWSTR, LPDWORD, LPDWORD); diff --git a/druntime/src/core/sys/windows/intshcut.d b/druntime/src/core/sys/windows/intshcut.d index ab662e418e7..cc4bf623542 100644 --- a/druntime/src/core/sys/windows/intshcut.d +++ b/druntime/src/core/sys/windows/intshcut.d @@ -70,7 +70,7 @@ interface IUniformResourceLocator : IUnknown { alias IUniformResourceLocator PIUniformResourceLocator, PCIUniformResourceLocator; -extern (Windows) { +extern (Windows) nothrow @nogc { BOOL InetIsOffline(DWORD); HRESULT MIMEAssociationDialogA(HWND, DWORD, PCSTR, PCSTR, PSTR, UINT); HRESULT MIMEAssociationDialogW(HWND, DWORD, PCWSTR, PCWSTR, PWSTR, UINT); diff --git a/druntime/src/core/sys/windows/iphlpapi.d b/druntime/src/core/sys/windows/iphlpapi.d index 4a8e64cbef0..d8f0948ca3f 100644 --- a/druntime/src/core/sys/windows/iphlpapi.d +++ b/druntime/src/core/sys/windows/iphlpapi.d @@ -13,7 +13,7 @@ version (Windows): import core.sys.windows.ipexport, core.sys.windows.iprtrmib, core.sys.windows.iptypes; import core.sys.windows.winbase, core.sys.windows.windef; -extern (Windows) { +extern (Windows) nothrow @nogc { DWORD AddIPAddress(IPAddr, IPMask, DWORD, PULONG, PULONG); DWORD CreateIpForwardEntry(PMIB_IPFORWARDROW); DWORD CreateIpNetEntry(PMIB_IPNETROW); diff --git a/druntime/src/core/sys/windows/lmaccess.d b/druntime/src/core/sys/windows/lmaccess.d index 9791ff6e391..cf6f9d4c4d1 100644 --- a/druntime/src/core/sys/windows/lmaccess.d +++ b/druntime/src/core/sys/windows/lmaccess.d @@ -708,7 +708,7 @@ struct NETLOGON_INFO_3{ } alias NETLOGON_INFO_3* PNETLOGON_INFO_3; -extern (Windows) { +extern (Windows) nothrow @nogc { deprecated { /* These are obsolete */ NET_API_STATUS NetAccessAdd(LPCWSTR,DWORD,PBYTE,PDWORD); diff --git a/druntime/src/core/sys/windows/lmalert.d b/druntime/src/core/sys/windows/lmalert.d index ad0c3ca7b18..acb96cfbc90 100644 --- a/druntime/src/core/sys/windows/lmalert.d +++ b/druntime/src/core/sys/windows/lmalert.d @@ -71,7 +71,7 @@ struct USER_OTHER_INFO{ } alias USER_OTHER_INFO* PUSER_OTHER_INFO, LPUSER_OTHER_INFO; -extern (Windows) { +extern (Windows) nothrow @nogc { NET_API_STATUS NetAlertRaise(LPCWSTR,PVOID,DWORD); NET_API_STATUS NetAlertRaiseEx(LPCWSTR,PVOID,DWORD,LPCWSTR); } diff --git a/druntime/src/core/sys/windows/lmapibuf.d b/druntime/src/core/sys/windows/lmapibuf.d index e8559543f3e..85ccd1f49f2 100644 --- a/druntime/src/core/sys/windows/lmapibuf.d +++ b/druntime/src/core/sys/windows/lmapibuf.d @@ -12,7 +12,7 @@ pragma(lib, "netapi32"); import core.sys.windows.lmcons, core.sys.windows.windef; -extern (Windows) { +extern (Windows) nothrow @nogc { NET_API_STATUS NetApiBufferAllocate(DWORD, PVOID*); NET_API_STATUS NetApiBufferFree(PVOID); NET_API_STATUS NetApiBufferReallocate(PVOID, DWORD, PVOID*); diff --git a/druntime/src/core/sys/windows/lmmsg.d b/druntime/src/core/sys/windows/lmmsg.d index a3abd605422..eab87882747 100644 --- a/druntime/src/core/sys/windows/lmmsg.d +++ b/druntime/src/core/sys/windows/lmmsg.d @@ -32,7 +32,7 @@ struct MSG_INFO_1 { } alias MSG_INFO_1* PMSG_INFO_1, LPMSG_INFO_1; -extern (Windows) { +extern (Windows) nothrow @nogc { NET_API_STATUS NetMessageBufferSend(LPCWSTR, LPCWSTR, LPCWSTR, PBYTE, DWORD); NET_API_STATUS NetMessageNameAdd(LPCWSTR, LPCWSTR); diff --git a/druntime/src/core/sys/windows/lmremutl.d b/druntime/src/core/sys/windows/lmremutl.d index 8c90df73f2a..196be667fec 100644 --- a/druntime/src/core/sys/windows/lmremutl.d +++ b/druntime/src/core/sys/windows/lmremutl.d @@ -52,7 +52,7 @@ struct TIME_OF_DAY_INFO { } alias TIME_OF_DAY_INFO* PTIME_OF_DAY_INFO, LPTIME_OF_DAY_INFO; -extern (Windows) { +extern (Windows) nothrow @nogc { NET_API_STATUS NetRemoteTOD(LPCWSTR, PBYTE*); NET_API_STATUS NetRemoteComputerSupports(LPCWSTR, DWORD, PDWORD); NET_API_STATUS RxRemoteApi(DWORD, LPCWSTR, LPDESC, LPDESC, LPDESC, diff --git a/druntime/src/core/sys/windows/mgmtapi.d b/druntime/src/core/sys/windows/mgmtapi.d index 8f84eea54e8..336d24e750e 100644 --- a/druntime/src/core/sys/windows/mgmtapi.d +++ b/druntime/src/core/sys/windows/mgmtapi.d @@ -29,7 +29,7 @@ enum MGMCTL_SETAGENTPORT = 1; alias PVOID LPSNMP_MGR_SESSION; -extern (Windows) { +extern (Windows) nothrow @nogc { BOOL SnmpMgrClose(LPSNMP_MGR_SESSION); BOOL SnmpMgrCtl(LPSNMP_MGR_SESSION, DWORD, LPVOID, DWORD, LPVOID, DWORD, LPDWORD); diff --git a/druntime/src/core/sys/windows/ntdll.d b/druntime/src/core/sys/windows/ntdll.d index 28d560c537b..7f0c47a15fc 100644 --- a/druntime/src/core/sys/windows/ntdll.d +++ b/druntime/src/core/sys/windows/ntdll.d @@ -19,4 +19,4 @@ enum SHUTDOWN_ACTION { ShutdownPowerOff } -extern (Windows) uint NtShutdownSystem(SHUTDOWN_ACTION Action); +extern (Windows) nothrow @nogc uint NtShutdownSystem(SHUTDOWN_ACTION Action); diff --git a/druntime/src/core/sys/windows/ntsecapi.d b/druntime/src/core/sys/windows/ntsecapi.d index fa08a74ee5b..77101f669b4 100644 --- a/druntime/src/core/sys/windows/ntsecapi.d +++ b/druntime/src/core/sys/windows/ntsecapi.d @@ -726,7 +726,7 @@ struct TRUSTED_DOMAIN_FULL_INFORMATION { } alias TRUSTED_DOMAIN_FULL_INFORMATION* PTRUSTED_DOMAIN_FULL_INFORMATION; -extern (Windows) { +extern (Windows) nothrow @nogc { NTSTATUS LsaAddAccountRights(LSA_HANDLE, PSID, PLSA_UNICODE_STRING, ULONG); NTSTATUS LsaCallAuthenticationPackage(HANDLE, ULONG, PVOID, ULONG, diff --git a/druntime/src/core/sys/windows/prsht.d b/druntime/src/core/sys/windows/prsht.d index 053b1fa2ac9..570d1689b38 100644 --- a/druntime/src/core/sys/windows/prsht.d +++ b/druntime/src/core/sys/windows/prsht.d @@ -331,7 +331,7 @@ struct PSHNOTIFY { } alias PSHNOTIFY* LPPSHNOTIFY; -extern (Windows) { +extern (Windows) nothrow @nogc { HPROPSHEETPAGE CreatePropertySheetPageA(LPCPROPSHEETPAGEA); HPROPSHEETPAGE CreatePropertySheetPageW(LPCPROPSHEETPAGEW); BOOL DestroyPropertySheetPage(HPROPSHEETPAGE); diff --git a/druntime/src/core/sys/windows/rpc.d b/druntime/src/core/sys/windows/rpc.d index b432bc7c681..3b7e28d213c 100644 --- a/druntime/src/core/sys/windows/rpc.d +++ b/druntime/src/core/sys/windows/rpc.d @@ -26,6 +26,6 @@ public import core.sys.windows.winerror; alias MIDL_user_allocate midl_user_allocate; alias MIDL_user_free midl_user_free; -extern (Windows) { +extern (Windows) nothrow @nogc { int I_RpcMapWin32Status(RPC_STATUS); }