Compile error with WINVER=0x0601

Plug-in and third party software discussion.
Post Reply
Gisle Vanem
Posts: 34
Joined: Mon May 04, 2015 10:30 am

Compile error with WINVER=0x0601

Post by Gisle Vanem »

Compiling everything.c with WINVER=0x0601 (or WIN32_WINNT=0x0601), gives these errors from MSVC-2015:

Code: Select all

Everything.c(43): warning C4005: 'MSGFLT_ALLOW': macro redefinition
f:\ProgramFiler-x86\WindowsKits\Include\10.0.15063.0\um\winuser.h(15076): note: see previous definition of 'MSGFLT_ALLOW'
Everything.c(46): error C2011: 'tagCHANGEFILTERSTRUCT': 'struct' type redefinition
f:\ProgramFiler-x86\WindowsKits\Include\10.0.15063.0\um\winuser.h(15064): note: see declaration of 'tagCHANGEFILTERSTRUCT'
A fix would be to say:

Code: Select all

#if !defined(MSGFLT_ALLOW) /* <winuser.h> at WINVER >= 0x0601 already has this */
#define MSGFLT_ALLOW		1

typedef struct tagCHANGEFILTERSTRUCT
{
	DWORD cbSize;
	DWORD ExtStatus;
}CHANGEFILTERSTRUCT, *PCHANGEFILTERSTRUCT;
#endif
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: Compile error with WINVER=0x0601

Post by void »

I've updated the SDK, thanks for the compile issue report.
Post Reply