zenghao
驱动牛犊
驱动牛犊
  • 注册日期2001-03-23
  • 最后登录2010-04-29
  • 粉丝0
  • 关注0
  • 积分1分
  • 威望1点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:2103回复:4

版主请进:将XPDDK下Passthru改为C++ driver(50分)

楼主#
更多 发布于:2002-12-20 15:00
DriverWorks下有一个例程:
portio演示了如何将DDK下的portio转换为
C++的格式,我按照其说明的步骤成功的
转换了DDK下的portio,但是转换Passthru
不成功,
以下为SOURCE文件:
TARGETNAME=passthru
TARGETPATH=obj
TARGETTYPE=DRIVER

C_DEFINES=$(C_DEFINES) -DNDIS_MINIPORT_DRIVER -DNDIS_WDM=1 -DNTVERSION=WDM

C_DEFINES=$(C_DEFINES) -DNDIS40_MINIPORT=1
C_DEFINES=$(C_DEFINES) -DNDIS40=1

PRECOMPILED_INCLUDE=precomp.h
PRECOMPILED_PCH=precomp.pch
PRECOMPILED_OBJ=precomp.obj

TARGETLIBS=$(DDK_LIB_PATH)\\ndis.lib $(DRIVERWORKS)\\lib\\i386\\checked\\vdw_wdm.lib

USE_MAPSYM=1

INCLUDES=..\\;\\
$(DRIVERWORKS)\\include;\\
$(DRIVERWORKS)\\source;\\
$(BASEDIR)\\inc\\ddk;\\
$(BASEDIR)\\inc

SOURCES=\\
    miniport.cpp \\
    passthru.cpp \\
    passthru.rc \\
    protocol.cpp
其他步骤按照portio(C++)做的
以下为编译错误:
Current DDK Directory = c:\\NTDDK
Building for I386
******Configuration: passthru - Win32 Checked *************

Invalid keyboard code specified
New or updated MSVC detected.  Updating DDK environment....

Setting environment for using Microsoft Visual C++ tools.
Starting dirs creation...Completed.
BUILD: Object root set to: ==> objchk
BUILD: /i switch ignored
BUILD: Compile and Link for i386
BUILD: Loading c:\\NTDDK\\build.dat...
BUILD: Computing Include file dependencies:
BUILD: c:\\program files\\microsoft visual studio\\vc98\\include\\exdisp.odl(31): c:\\program files\\microsoft visual studio\\vc98\\include\\exdisp.odl - invalid include statement: importlib(STDOLE_TLB);
BUILD: c:\\program files\\microsoft visual studio\\vc98\\include\\vidsvr.odl(16): c:\\program files\\microsoft visual studio\\vc98\\include\\vidsvr.odl - invalid include statement: importlib(STDOLE_TLB);
BUILD: c:\\progra~1\\micros~3\\vc98\\include\\exdisp.odl(31): c:\\progra~1\\micros~3\\vc98\\include\\exdisp.odl - invalid include statement: importlib(STDOLE_TLB);
BUILD: c:\\progra~1\\micros~3\\vc98\\include\\vidsvr.odl(16): c:\\progra~1\\micros~3\\vc98\\include\\vidsvr.odl - invalid include statement: importlib(STDOLE_TLB);
BUILD: Examining e:\\c__~1\\xp_pas~1 directory for files to compile.
    e:\\c__~1\\xp_pas~1
    e:\\c__~1\\xp_pas~1 - 5 source files (3,294 lines)
BUILD: Saving c:\\NTDDK\\build.dat...
BUILD: Compiling e:\\c__~1\\xp_pas~1 directory
Compiling Precompiled Header - precomp.h for i386
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\vdw.h(72) : error C2059: syntax error : \'string\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\..\\..\\common\\include\\stcinit.h(167) : error C2061: syntax error : identifier \'AtExitCall\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\..\\..\\common\\include\\stcinit.h(167) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\..\\..\\common\\include\\stcinit.h(168) : error C2449: found \'{\' at file scope (missing function header?)
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\..\\..\\common\\include\\stcinit.h(199) : error C2059: syntax error : \'}\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(40) : error C2061: syntax error : identifier \'DefaultPoolTag\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(40) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(44) : error C2054: expected \'(\' to follow \'inline\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(44) : error C2146: syntax error : missing \')\' before identifier \'tag\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(44) : error C2085: \'SetPoolTag\' : not in formal parameter list
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(44) : error C2146: syntax error : missing \',\' before identifier \'tag\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(44) : error C2059: syntax error : \')\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(45) : error C2143: syntax error : missing \';\' before \'{\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(60) : error C2054: expected \'(\' to follow \'inline\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(60) : error C2085: \'operator\' : not in formal parameter list
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(60) : error C2146: syntax error : missing \',\' before identifier \'new\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(60) : error C2143: syntax error : missing \';\' before \'(\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(60) : error C2059: syntax error : \')\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(69) : error C2054: expected \'(\' to follow \'inline\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(69) : error C2085: \'operator\' : not in formal parameter list
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(69) : error C2146: syntax error : missing \',\' before identifier \'new\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(69) : error C2143: syntax error : missing \';\' before \'(\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(69) : error C2059: syntax error : \')\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(80) : error C2054: expected \'(\' to follow \'inline\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(80) : error C2085: \'operator\' : not in formal parameter list
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(80) : error C2146: syntax error : missing \',\' before identifier \'delete\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(80) : error C2143: syntax error : missing \';\' before \'(\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(80) : error C2059: syntax error : \')\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(87) : error C2054: expected \'(\' to follow \'inline\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(87) : error C2085: \'operator\' : not in formal parameter list
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(87) : error C2146: syntax error : missing \',\' before identifier \'new\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(87) : error C2143: syntax error : missing \';\' before \'(\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(87) : error C2059: syntax error : \')\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(97) : error C2054: expected \'(\' to follow \'inline\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(97) : error C2085: \'operator\' : not in formal parameter list
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(97) : error C2146: syntax error : missing \',\' before identifier \'delete\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(97) : error C2143: syntax error : missing \';\' before \'(\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(97) : error C2059: syntax error : \')\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(102) : error C2054: expected \'(\' to follow \'inline\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(102) : error C2085: \'operator\' : not in formal parameter list
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(102) : error C2146: syntax error : missing \',\' before identifier \'delete\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(102) : error C2143: syntax error : missing \';\' before \'[\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(36) : error C2059: syntax error : \'&\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(41) : error C2059: syntax error : \'string\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(56) : error C2059: syntax error : \'string\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(61) : error C2143: syntax error : missing \'{\' before \'<\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(61) : error C2059: syntax error : \'<\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(77) : error C2143: syntax error : missing \'{\' before \'<\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(77) : error C2059: syntax error : \'<\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(78) : error C2143: syntax error : missing \'{\' before \'<\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(78) : error C2059: syntax error : \'<\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(79) : error C2143: syntax error : missing \'{\' before \'<\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(79) : error C2059: syntax error : \'<\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(32) : error C2061: syntax error : identifier \'KDriver\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(32) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(33) : error C2061: syntax error : identifier \'KDevice\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(33) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(34) : error C2061: syntax error : identifier \'KLowerDevice\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(34) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(35) : error C2061: syntax error : identifier \'KPnpLowerDevice\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(35) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(36) : error C2061: syntax error : identifier \'KPnpDevice\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(36) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(37) : error C2061: syntax error : identifier \'KWorkItem\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(37) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(38) : error C2061: syntax error : identifier \'KPciConfiguration\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(38) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(39) : error C2061: syntax error : identifier \'KInterrupt\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(39) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(40) : error C2061: syntax error : identifier \'KFile\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(40) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(41) : error C2061: syntax error : identifier \'KSystemThread\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(41) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(42) : error C2061: syntax error : identifier \'KRegistryKey\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(42) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(43) : error C2061: syntax error : identifier \'KUsbLowerDevice\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(43) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(44) : error C2061: syntax error : identifier \'KUsbInterface\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(44) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(45) : error C2061: syntax error : identifier \'KUsbPipe\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(45) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(46) : error C2061: syntax error : identifier \'KDmaAdapter\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(46) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(47) : error C2061: syntax error : identifier \'KCommonDmaBuffer\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(47) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(48) : error C2061: syntax error : identifier \'KDmaTransfer\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(48) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(50) : error C2143: syntax error : missing \')\' before \'*\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(50) : error C2143: syntax error : missing \'{\' before \'*\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(50) : error C2059: syntax error : \',\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(50) : error C2059: syntax error : \')\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(62) : error C2061: syntax error : identifier \'BoundsChecker\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(62) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(63) : error C2449: found \'{\' at file scope (missing function header?)
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(72) : error C2059: syntax error : \'}\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(198) : error C2143: syntax error : missing \')\' before \'*\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(198) : error C2081: \'KDriver\' : name in formal parameter list illegal
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(198) : error C2143: syntax error : missing \'{\' before \'*\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(199) : error C2370: \'POOL_TYPE\' : redefinition; different storage class
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(199) : error C2146: syntax error : missing \';\' before identifier \'Pool\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(200) : error C2059: syntax error : \'type\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(200) : error C1003: error count exceeds 100; stopping compilation
Compiling Precompiled Header - precomp.h for i386
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\vdw.h(72) : error C2059: syntax error : \'string\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\..\\..\\common\\include\\stcinit.h(167) : error C2061: syntax error : identifier \'AtExitCall\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\..\\..\\common\\include\\stcinit.h(167) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\..\\..\\common\\include\\stcinit.h(168) : error C2449: found \'{\' at file scope (missing function header?)
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\..\\..\\common\\include\\stcinit.h(199) : error C2059: syntax error : \'}\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(40) : error C2061: syntax error : identifier \'DefaultPoolTag\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(40) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(44) : error C2054: expected \'(\' to follow \'inline\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(44) : error C2146: syntax error : missing \')\' before identifier \'tag\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(44) : error C2085: \'SetPoolTag\' : not in formal parameter list
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(44) : error C2146: syntax error : missing \',\' before identifier \'tag\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(44) : error C2059: syntax error : \')\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(45) : error C2143: syntax error : missing \';\' before \'{\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(60) : error C2054: expected \'(\' to follow \'inline\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(60) : error C2085: \'operator\' : not in formal parameter list
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(60) : error C2146: syntax error : missing \',\' before identifier \'new\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(60) : error C2143: syntax error : missing \';\' before \'(\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(60) : error C2059: syntax error : \')\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(69) : error C2054: expected \'(\' to follow \'inline\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(69) : error C2085: \'operator\' : not in formal parameter list
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(69) : error C2146: syntax error : missing \',\' before identifier \'new\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(69) : error C2143: syntax error : missing \';\' before \'(\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(69) : error C2059: syntax error : \')\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(80) : error C2054: expected \'(\' to follow \'inline\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(80) : error C2085: \'operator\' : not in formal parameter list
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(80) : error C2146: syntax error : missing \',\' before identifier \'delete\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(80) : error C2143: syntax error : missing \';\' before \'(\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(80) : error C2059: syntax error : \')\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(87) : error C2054: expected \'(\' to follow \'inline\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(87) : error C2085: \'operator\' : not in formal parameter list
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(87) : error C2146: syntax error : missing \',\' before identifier \'new\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(87) : error C2143: syntax error : missing \';\' before \'(\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(87) : error C2059: syntax error : \')\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(97) : error C2054: expected \'(\' to follow \'inline\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(97) : error C2085: \'operator\' : not in formal parameter list
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(97) : error C2146: syntax error : missing \',\' before identifier \'delete\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(97) : error C2143: syntax error : missing \';\' before \'(\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(97) : error C2059: syntax error : \')\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(102) : error C2054: expected \'(\' to follow \'inline\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(102) : error C2085: \'operator\' : not in formal parameter list
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(102) : error C2146: syntax error : missing \',\' before identifier \'delete\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\cpprt.h(102) : error C2143: syntax error : missing \';\' before \'[\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(36) : error C2059: syntax error : \'&\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(41) : error C2059: syntax error : \'string\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(56) : error C2059: syntax error : \'string\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(61) : error C2143: syntax error : missing \'{\' before \'<\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(61) : error C2059: syntax error : \'<\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(77) : error C2143: syntax error : missing \'{\' before \'<\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(77) : error C2059: syntax error : \'<\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(78) : error C2143: syntax error : missing \'{\' before \'<\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(78) : error C2059: syntax error : \'<\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(79) : error C2143: syntax error : missing \'{\' before \'<\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\util.h(79) : error C2059: syntax error : \'<\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(32) : error C2061: syntax error : identifier \'KDriver\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(32) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(33) : error C2061: syntax error : identifier \'KDevice\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(33) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(34) : error C2061: syntax error : identifier \'KLowerDevice\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(34) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(35) : error C2061: syntax error : identifier \'KPnpLowerDevice\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(35) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(36) : error C2061: syntax error : identifier \'KPnpDevice\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(36) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(37) : error C2061: syntax error : identifier \'KWorkItem\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(37) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(38) : error C2061: syntax error : identifier \'KPciConfiguration\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(38) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(39) : error C2061: syntax error : identifier \'KInterrupt\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(39) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(40) : error C2061: syntax error : identifier \'KFile\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(40) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(41) : error C2061: syntax error : identifier \'KSystemThread\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(41) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(42) : error C2061: syntax error : identifier \'KRegistryKey\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(42) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(43) : error C2061: syntax error : identifier \'KUsbLowerDevice\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(43) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(44) : error C2061: syntax error : identifier \'KUsbInterface\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(44) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(45) : error C2061: syntax error : identifier \'KUsbPipe\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(45) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(46) : error C2061: syntax error : identifier \'KDmaAdapter\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(46) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(47) : error C2061: syntax error : identifier \'KCommonDmaBuffer\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(47) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(48) : error C2061: syntax error : identifier \'KDmaTransfer\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(48) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(50) : error C2143: syntax error : missing \')\' before \'*\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(50) : error C2143: syntax error : missing \'{\' before \'*\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(50) : error C2059: syntax error : \',\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(50) : error C2059: syntax error : \')\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(62) : error C2061: syntax error : identifier \'BoundsChecker\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(62) : error C2059: syntax error : \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(63) : error C2449: found \'{\' at file scope (missing function header?)
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(72) : error C2059: syntax error : \'}\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(198) : error C2143: syntax error : missing \')\' before \'*\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(198) : error C2081: \'KDriver\' : name in formal parameter list illegal
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(198) : error C2143: syntax error : missing \'{\' before \'*\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(199) : error C2370: \'POOL_TYPE\' : redefinition; different storage class
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(199) : error C2146: syntax error : missing \';\' before identifier \'Pool\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(200) : error C2059: syntax error : \'type\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(200) : error C1003: error count exceeds 100; stopping compilation
Compiling - passthru.rc for i386
Compiling - miniport.cpp for i386
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(404) : error C2061: syntax error : identifier \'PFILE_ALIGNMENT_INFORMATION\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kevent.h(154) : error C2065: \'KeReadStateEvent\' : undeclared identifier
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(52) : error C2833: \'operator PCONTROLLER_OBJECT\' is not a recognized operator or type
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(52) : error C2059: syntax error : \'newline\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(52) : error C2238: unexpected token(s) preceding \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(56) : error C2146: syntax error : missing \';\' before identifier \'m_pController\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(56) : error C2501: \'PCONTROLLER_OBJECT\' : missing storage-class or type specifiers
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(56) : error C2501: \'m_pController\' : missing storage-class or type specifiers
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(62) : error C2614: \'KController\' : illegal member initialization: \'m_pController\' is not a base or member
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(63) : error C2065: \'m_pController\' : undeclared identifier
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(63) : error C2065: \'IoCreateController\' : undeclared identifier
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(80) : error C2065: \'IoDeleteController\' : undeclared identifier
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(99) : error C2065: \'IoAllocateController\' : undeclared identifier
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(116) : error C2065: \'IoFreeController\' : undeclared identifier
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(122) : error C2833: \'operator PCONTROLLER_OBJECT\' is not a recognized operator or type
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(123) : error C1903: unable to recover from previous error(s); stopping compilation
Compiling - passthru.cpp for i386
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(404) : error C2061: syntax error : identifier \'PFILE_ALIGNMENT_INFORMATION\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kevent.h(154) : error C2065: \'KeReadStateEvent\' : undeclared identifier
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(52) : error C2833: \'operator PCONTROLLER_OBJECT\' is not a recognized operator or type
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(52) : error C2059: syntax error : \'newline\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(52) : error C2238: unexpected token(s) preceding \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(56) : error C2146: syntax error : missing \';\' before identifier \'m_pController\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(56) : error C2501: \'PCONTROLLER_OBJECT\' : missing storage-class or type specifiers
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(56) : error C2501: \'m_pController\' : missing storage-class or type specifiers
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(62) : error C2614: \'KController\' : illegal member initialization: \'m_pController\' is not a base or member
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(63) : error C2065: \'m_pController\' : undeclared identifier
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(63) : error C2065: \'IoCreateController\' : undeclared identifier
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(80) : error C2065: \'IoDeleteController\' : undeclared identifier
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(99) : error C2065: \'IoAllocateController\' : undeclared identifier
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(116) : error C2065: \'IoFreeController\' : undeclared identifier
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(122) : error C2833: \'operator PCONTROLLER_OBJECT\' is not a recognized operator or type
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(123) : error C1903: unable to recover from previous error(s); stopping compilation
Compiling - protocol.cpp for i386
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kchecker.h(404) : error C2061: syntax error : identifier \'PFILE_ALIGNMENT_INFORMATION\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kevent.h(154) : error C2065: \'KeReadStateEvent\' : undeclared identifier
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(52) : error C2833: \'operator PCONTROLLER_OBJECT\' is not a recognized operator or type
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(52) : error C2059: syntax error : \'newline\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(52) : error C2238: unexpected token(s) preceding \';\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(56) : error C2146: syntax error : missing \';\' before identifier \'m_pController\'
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(56) : error C2501: \'PCONTROLLER_OBJECT\' : missing storage-class or type specifiers
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(56) : error C2501: \'m_pController\' : missing storage-class or type specifiers
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(62) : error C2614: \'KController\' : illegal member initialization: \'m_pController\' is not a base or member
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(63) : error C2065: \'m_pController\' : undeclared identifier
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(63) : error C2065: \'IoCreateController\' : undeclared identifier
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(80) : error C2065: \'IoDeleteController\' : undeclared identifier
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(99) : error C2065: \'IoAllocateController\' : undeclared identifier
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(116) : error C2065: \'IoFreeController\' : undeclared identifier
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(122) : error C2833: \'operator PCONTROLLER_OBJECT\' is not a recognized operator or type
c:\\progra~1\\compuware\\driverstudio\\driverworks\\include\\kcontrol.h(123) : error C1903: unable to recover from previous error(s); stopping compilation
BUILD: Compile errors: not linking e:\\c__~1\\xp_pas~1 directory
BUILD: Done

    6 files compiled - 14 Warnings - 252 Errors -  1100 LPS
Tool returned code: 0
有谁做过这种活?回答正确可再加分。
3x!!!
ydyuse
驱动老牛
驱动老牛
  • 注册日期2002-07-25
  • 最后登录2005-03-26
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2002-12-20 16:39
在passthru.h文件中最前面加
#ifdef __cplusplus
extern \"C\"
{
#endif

最后加:

#ifdef __cplusplus
}
#endif

同时。C中包含头文件的地方也要如此:
#ifdef __cplusplus
extern \"C\"
{
#endif

.....
#include <wdm.h>
....
#ifdef __cplusplus
}
#endif
生命驱动,活力无限!
ydyuse
驱动老牛
驱动老牛
  • 注册日期2002-07-25
  • 最后登录2005-03-26
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2002-12-20 17:09
搞定没有?
生命驱动,活力无限!
zenghao
驱动牛犊
驱动牛犊
  • 注册日期2001-03-23
  • 最后登录2010-04-29
  • 粉丝0
  • 关注0
  • 积分1分
  • 威望1点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地板#
发布于:2002-12-20 17:48
没有用
zenghao
驱动牛犊
驱动牛犊
  • 注册日期2001-03-23
  • 最后登录2010-04-29
  • 粉丝0
  • 关注0
  • 积分1分
  • 威望1点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2002-12-20 17:50
没有用,还是搞不定。
我尝试用DriverWorks的Wizard生成一个Simple C++ Driver,
然后将Passthru移植过去,尚未搞定。
游客

返回顶部