Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > WDK 7.0.0 compilation error


Reply
Fix Vista Errors
Thread Tools Display Modes

WDK 7.0.0 compilation error

 
 
scur
Guest
Posts: n/a

 
      08-27-2009
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
 
Reply With Quote
 
 
 
 
Doron Holan [MSFT]
Guest
Posts: n/a

 
      08-27-2009
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" <> wrote in message
news:78F2C2C1-8DD6-48D4-A64B-...
> 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


 
Reply With Quote
 
scur
Guest
Posts: n/a

 
      08-27-2009
Hi Doron,

Thanks for your reply. So I have to upgrade my Windows SDK 6.0A to
Windows 7 SDK, right? Or should I use an earlier version of WDK? Right now,
on Microsoft website, I could not find the earlier WDK versions. So the only
choice for me is to upgrade the SDK, right?

Thanks,
scur

"Doron Holan [MSFT]" wrote:

> you definitely need to move the win7 wdk. annotations in general are not
> downlevel compatible
>
> d


 
Reply With Quote
 
scur
Guest
Posts: n/a

 
      08-28-2009
The problem is fixed after I upgrade SDK to Window 7 SDK.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Message 80070005 installing WMP Godenjoyer Windows Media Player 7 08-08-2009 09:18 PM
Error returned while creating the volume shadow copy:8004231f Bryan Marks Windows Server 0 02-13-2008 07:34 PM
Minidumps available ! Skybuck Flying Windows 64 Bit 18 10-09-2007 08:23 PM
SP2 Installation Problems Brian Windows Server 0 06-14-2007 05:16 PM
I cannot successfully install windows xp x64 Andreas Buhler Windows 64 Bit 8 02-11-2006 03:38 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59