Compile error with WINVER=0x0601

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

Compile error with WINVER=0x0601

Postby Gisle Vanem » Wed Jun 14, 2017 3:38 pm

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;

Site Admin
Posts: 3785
Joined: Fri Oct 16, 2009 11:31 pm

Re: Compile error with WINVER=0x0601

Postby void » Wed Jun 14, 2017 10:48 pm

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

Return to “Development, plugins and third party software”