The error "linkage specification is incompatible with previous "MonitorFromWindow"" in 32 bit build VS10 MCBS is given for the following decl:
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);
}
Assumed the solution would be similar to the one given here, but here it might be some problem with the SDK although some kind of header hack is preferred.