Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
core.sys.windows.winuser: Provide valid GetMonitorInfo overloads
Browse files Browse the repository at this point in the history
LDC isn't fooled by using the same mangled name for multiple C function
declarations with differing signatures (see DMD bugzilla 15217).

In the MS header, the ...EX structs derive from the non-EX ones, so a
pointer to an EX struct is implicitly converted to a pointer to the base
struct.

Provide extern(D) wrappers performing the explicitly required cast in D.
  • Loading branch information
kinke committed Mar 29, 2016
1 parent 272fb4e commit ab73b0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/sys/windows/winuser.d
Expand Up @@ -4423,9 +4423,9 @@ int BroadcastSystemMessageW(DWORD, LPDWORD, UINT, WPARAM, LPARAM);
UINT SendInput(UINT, LPINPUT, int);
BOOL EnumDisplayMonitors(HDC, LPCRECT, MONITORENUMPROC, LPARAM);
BOOL GetMonitorInfoA(HMONITOR, LPMONITORINFO);
BOOL GetMonitorInfoA(HMONITOR, LPMONITORINFOEXA);
extern(D) BOOL GetMonitorInfoA(HMONITOR m, LPMONITORINFOEXA mi) { return GetMonitorInfoA(m, cast(LPMONITORINFO)mi); }
BOOL GetMonitorInfoW(HMONITOR, LPMONITORINFO);
BOOL GetMonitorInfoW(HMONITOR, LPMONITORINFOEXW);
extern(D) BOOL GetMonitorInfoW(HMONITOR m, LPMONITORINFOEXW mi) { return GetMonitorInfoW(m, cast(LPMONITORINFO)mi); }
HMONITOR MonitorFromPoint(POINT, DWORD);
HMONITOR MonitorFromRect(LPCRECT, DWORD);
HMONITOR MonitorFromWindow(HWND, DWORD);
Expand Down

0 comments on commit ab73b0a

Please sign in to comment.