Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error including Microsoft DDK libraries in application

Status
Not open for further replies.

joelrybi

Programmer
Sep 29, 2005
1
US
I am new at using Visual c++ and I cannot figure out this problem. I am trying to use two microsoft DDK libraries, one is newdev.lib and one is setupapi.lib. I have copied the four files (newdev.h,newdev.lib,setupapi.h,setupapi.lib) into the same directory as my main class (this is a console application). I added the following lines to my stdafx.h file:
Code:
#include <newdev.h>
#include <setupapi.h>
when I build I get syntax errors such as

"c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\newdev.h(29): error C2146: syntax error : missing ';' before identifier 'WINAPI'"

in the newdev.h, setupapi.h, and some other header files. There are about 26 errors in all.
These are files supplied by microsoft, why am I getting syntax errors?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top