Add include directory of DDK as "additional include directories" in vc++ 2008 express

Hi,
I want to use SetupDIxxx in my application to access the interface
of my driver.
So I add the ‘inc’ directory of the DDK
“C:\WinDDK\6001.18002\inc\api” as “additional include directories” in
vc++ 2008 express".
But I’ve got a lot of error:

------ Build started: Project: bbb, Configuration: Debug Win32 ------
1>Compiling…
1>stdafx.cpp
1>c:\program files\microsoft visual studio 9.0\vc\include\excpt.h(60)
: error C2065: ‘In’ : undeclared identifier
1>c:\program files\microsoft visual studio 9.0\vc\include\excpt.h(60)
: error C2144: syntax error : ‘_EXCEPTION_RECORD’ should be preceded
by ‘)’
1>c:\program files\microsoft visual studio 9.0\vc\include\excpt.h(60)
: error C2448: ‘_except_handler’ : function-style initializer appears
to be a function definition
1>c:\program files\microsoft visual studio 9.0\vc\include\excpt.h(61)
: error C2144: syntax error : ‘void’ should be preceded by ‘;’
1>c:\program files\microsoft visual studio 9.0\vc\include\excpt.h(62)
: error C2144: syntax error : ‘_CONTEXT’ should be preceded by ‘;’

What should I do?
I heard that the DDK code(the SetupDIxxx) needs to be build in the DDK
build environment from some thread around
internet.

Cheers.
Long

The problem is either that you’re not including ‘specstrings.h’ before you include some other file that uses it, or you’re including the wrong version inadvertently by adding that directory either before or after where it needs to be.

I don’t know the specific answer, but I guess I’d try moving that directory to the front or the end of the include path and see what happens.

Good luck,

mm

Try installing Platform SDK and include the header from there.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

“Long Pu” wrote in message news:xxxxx@ntdev…
> Hi,
> I want to use SetupDIxxx in my application to access the interface
> of my driver.
> So I add the ‘inc’ directory of the DDK
> “C:\WinDDK\6001.18002\inc\api” as “additional include directories” in
> vc++ 2008 express".
> But I’ve got a lot of error:
>>------ Build started: Project: bbb, Configuration: Debug Win32 ------
> 1>Compiling…
> 1>stdafx.cpp
> 1>c:\program files\microsoft visual studio 9.0\vc\include\excpt.h(60)
> : error C2065: ‘In’ : undeclared identifier
> 1>c:\program files\microsoft visual studio 9.0\vc\include\excpt.h(60)
> : error C2144: syntax error : ‘_EXCEPTION_RECORD’ should be preceded
> by ‘)’
> 1>c:\program files\microsoft visual studio 9.0\vc\include\excpt.h(60)
> : error C2448: ‘_except_handler’ : function-style initializer appears
> to be a function definition
> 1>c:\program files\microsoft visual studio 9.0\vc\include\excpt.h(61)
> : error C2144: syntax error : ‘void’ should be preceded by ‘;’
> 1>c:\program files\microsoft visual studio 9.0\vc\include\excpt.h(62)
> : error C2144: syntax error : ‘_CONTEXT’ should be preceded by ‘;’
>
>
> What should I do?
> I heard that the DDK code(the SetupDIxxx) needs to be build in the DDK
> build environment from some thread around
> internet.
>
> Cheers.
> Long
>