From: Doron Holan [MSFT] on
you definitely need to move the win7 wdk. annotations in general are not
downlevel compatible

d

--

This posting is provided "AS IS" with no warranties, and confers no rights.


"scur" <scur(a)discussions.microsoft.com> wrote in message
news:78F2C2C1-8DD6-48D4-A64B-65F5E5E1F926(a)microsoft.com...
> I recently downloaded the latest WDK 7.0.0 and started working on HID USB.
> I
> downloaded an example code from http://www.lvr.com/hidpage.htm. I got a
> compilation error for usbhidioc.cpp -
>
> #include "stdafx.h"
> #include "usbhidioc.h"
> #include "usbhidiocDlg.h"
> #include <wtypes.h>
> #include <setupapi.h>
>
> extern "C" {
>
> #include "hidsdi.h"
> #include "process.h"
>
> }
> -------
>
> 1>Compiling...
> 1>usbhidioc.cpp
> 1>c:\winddk\7600.16385.0\inc\api\hidpi.h(302) : error C2065:
> 'PASSIVE_LEVEL'
> : undeclared identifier
> 1>c:\winddk\7600.16385.0\inc\api\hidpi.h(303) : error C4430: missing type
> specifier - int assumed. Note: C++ does not support default-int
> 1>c:\winddk\7600.16385.0\inc\api\hidpi.h(303) : error C2146: syntax error
> :
> missing ';' before identifier 'NTSTATUS'
>
> I know PASSIVE_LEVEL is defined in wdm.h, so I included ntifs.h (or wdm.h
> directly). I got the following error -
>
> 1>c:\winddk\7600.16385.0\inc\api\driverspecs.h(356) : error C2144: syntax
> error : 'char' should be preceded by ')'
> 1>c:\winddk\7600.16385.0\inc\api\driverspecs.h(356) : error C3861:
> 'SAL_functionClass': identifier not found
> 1>c:\winddk\7600.16385.0\inc\api\driverspecs.h(356) : error C2059: syntax
> error : ')'
> 1>c:\winddk\7600.16385.0\inc\api\driverspecs.h(374) : error C2144: syntax
> error : 'char' should be preceded by ')'
> 1>c:\winddk\7600.16385.0\inc\api\driverspecs.h(374) : error C3861:
> 'SAL_acquire': identifier not found
>
> It seems that the annotation is broken somehow. Should I include some
> other
> headers for hte annotation to work. I added also driverspecs.h but it does
> not work either. I am using Windows SDK 6.0 A. So is it a problem from the
> incompatibility of Windows SDK 6.0 A and WDK 7.0.0? Upgrading from
> Windows
> SDK 6.0A to Windows 7 SDK would not be a small feat for me.
>
> Many thanks,
> scur