Windows7.1 SDK: C2373: Override "MonitorFromWindow"

The communication specification "error" is incompatible with the previous "MonitorFromWindow" "in the 32-bit assembly VS10 MCBS is provided for the following declaration:

 int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow)
{
    HMONITOR MonitorFromWindow(_In_ HWND  hwnd, _In_ DWORD dwFlags);

    return DialogBoxW(hInstance, MAKEINTRESOURCEW(lpTemplate), nullptr, DlgProc);
}

Suppose the solution is similar to the solution here , but here it may be some kind of problem with the SDK, although some header header is preferable.

-2
source share
1 answer

, MonitorFromWindow . Winuser.h extern "C" linkage, is __declspec(dllimport) __stdcall.

.

+2

Source: https://habr.com/ru/post/1764171/


All Articles