# some errors in wddm miniport driver

• ### Question

• During my way to build a miniport display driver, I got some errors from the included Dispmprt.h file.

Some of the errors are:

Error C3646 'ACPI_METHOD_ARGUMENT': unknown override specifier MINIPORT C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared\acpiioct.h 177
Error    C2065    'ANYSIZE_ARRAY': undeclared identifier  MINIPORT C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared\acpiioct.h 169
Error    C3646    'Argument': unknown override specifier MINIPORT C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared\acpiioct.h 104

I opened the acpiioct.h and found out that many things like ANYSIZE_ARRAY and _Field_size_bytes_ had not been defined at all.

What can I do to have them solved?

The platform:

- visual studio 2015; windows 7;

I have built other kmdf drivers before with the same configuration and using ntddk.h file and there were no problem.

Monday, December 10, 2018 3:27 PM

### Answers

• I think you are misdiagnosing things here.  ANYSIZE_ARRAY is defined in ntdef.h, which is included by ntddk.h.

However, _Field_size_bytes_ is part of SAL2, the "source annotation language".  These annotations have changed very dramatically from release to release, and it is very easy to get these weird errors if you have a mismatch.  For example, if you are using the latest WDK with a down-level version of the SDK, that will do it.

And, in fact, that's what you have done.  The include file shows you are using the 1703 WDK (build 15063).  That version requires Visual Studio 2017.  You can't use it with Visual Studio 2015.  If you need to use VS2015, then you'll have to fetch the 1607 WDK, build 14393.

Tim Roberts | Driver MVP Emeritus | Providenza &amp; Boekelheide, Inc.

Tuesday, December 11, 2018 1:23 AM