yyl509
驱动牛犊
驱动牛犊
  • 注册日期2004-06-10
  • 最后登录2004-10-14
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1945回复:3

一个老问题,关于passthru编译,可我怎么也搞不定,急!(20分)

楼主#
更多 发布于:2004-06-15 10:03
procomp.h中已包括#define NDIS_WDM 1;

source文件如下:
TARGETNAME=PASSTHRU
TARGETPATH=obj
TARGETTYPE=DRIVER

TARGETLIBS=$(DDK_LIB_PATH)\ndis.lib
C_DEFINES=$(C_DEFINES) -DNDIS40 -DNDIS_MINIPORT_DRIVER -DNDIS40_MINIPORT

INCLUDES=..\..\..\inc

SOURCES= passthru.c    \
         protocol.c    \
         miniport.c    \

win2000中DDK环境中Checked编译错误如下:
passthru.c(37) : error C2146: syntax error : missing ')' before identifier 'Irp'
passthru.c(37) : error C2081: 'PIRP' : name in formal parameter list illegal
passthru.c(37) : error C2061: syntax error : identifier 'Irp'
passthru.c(37) : error C2059: syntax error : ';'
passthru.c(37) : error C2059: syntax error : ')'
passthru.c(38) : error C2146: syntax error : missing ')' before identifier 'Irp'
passthru.c(38) : error C2081: 'PIRP' : name in formal parameter list illegal
passthru.c(38) : error C2061: syntax error : identifier 'Irp'
passthru.c(38) : error C2059: syntax error : ';'
passthru.c(38) : error C2059: syntax error : ')'
passthru.c(154) : error C4013: 'RtlInitUnicodeString' undefined; assuming extern returning int
passthru.c(162) : error C2065: 'MydrvDispatch' : undeclared identifier
passthru.c(162) : error C4047: '=' : 'long (__stdcall *)(struct _DEVICE_OBJECT *,struct _IRP *)' differs in levels of indirection from 'int '
passthru.c(163) : error C4047: '=' : 'long (__stdcall *)(struct _DEVICE_OBJECT *,struct _IRP *)' differs in levels of indirection from 'int '
passthru.c(164) : error C2065: 'MydrvDispatchIoctl' : undeclared identifier
passthru.c(164) : error C4047: '=' : 'long (__stdcall *)(struct _DEVICE_OBJECT *,struct _IRP *)' differs in levels of indirection from 'int '
passthru.c(187) : error C4013: 'ExAllocatePool' undefined; assuming extern returning int
passthru.c(187) : error C4047: '=' : 'void *' differs in levels of indirection from 'int '
passthru.c(188) : error C4013: 'IoAllocateMdl' undefined; assuming extern returning int
passthru.c(188) : error C4047: '=' : 'struct _MDL *' differs in levels of indirection from 'int '
passthru.c(189) : error C4013: 'MmBuildMdlForNonPagedPool' undefined; assuming extern returning int
passthru.c(195) : error C2146: syntax error : missing ')' before identifier 'Irp'
passthru.c(195) : error C2081: 'PIRP' : name in formal parameter list illegal
passthru.c(195) : error C2061: syntax error : identifier 'Irp'
passthru.c(195) : error C2059: syntax error : ';'
passthru.c(195) : error C2059: syntax error : ')'
passthru.c(196) : error C2449: found '{' at file scope (missing function header?)
passthru.c(220) : error C2059: syntax error : '}'
mydef.c(17) : error C2275: 'P_SQL_PACKET_HEADER' : illegal use of this type as an expression
mydef.h(98) : error see declaration of 'P_SQL_PACKET_HEADER'
mydef.c(17) : error C2146: syntax error : missing ';' before identifier 'p_sql'
mydef.c(17) : error C2065: 'p_sql' : undeclared identifier
mydef.c(22) : error C4047: '=' : 'int ' differs in levels of indirection from 'struct _SQL_PACKET_HEADER *'
mydef.c(24) : error C2223: left of '->H_frame_type' must point to struct/union
mydef.c(24) : error C2223: left of '->L_frame_type' must point to struct/union
mydef.c(24) : error C2223: left of '->proto' must point to struct/union
mydef.c(24) : error C2223: left of '->th_dport' must point to struct/union
mydef.c(30) : error C2223: left of '->total_len' must point to struct/union
mydef.c(34) : error C4013: 'KeSetEvent' undefined; assuming extern returning int
mydef.c(40) : error C2065: 'EXCEPTION_EXECUTE_HANDLER' : undeclared identifier
protocol.c(640) : error C4013: 'NdisIMCopySendCompletePerPacketInfo' undefined; assuming extern returning int
miniport.c(241) : error C4013: 'NdisIMCopySendPerPacketInfo' undefined; assuming extern returning int
miniport.c(265) : error C4013: 'NdisIMCopySendCompletePerPacketInfo' undefined; assuming extern returning int
link() : error LNK1181: cannot open input file "objchk\i386\passthru.obj"

各位大侠救我!!!
asmsys
驱动老牛
驱动老牛
  • 注册日期2002-03-29
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分5分
  • 威望17点
  • 贡献值0点
  • 好评度8点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2004-06-18 12:18
C_DEFINES=$(C_DEFINES) -DNDIS_WDM=1
yyl509
驱动牛犊
驱动牛犊
  • 注册日期2004-06-10
  • 最后登录2004-10-14
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2004-06-18 11:56
不行啊!问题依旧:(
spike
驱动牛犊
驱动牛犊
  • 注册日期2004-01-25
  • 最后登录2004-08-06
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地板#
发布于:2004-06-18 10:48
问题不在source文件里
我觉得可能是dbprint的问题,你试着删掉所有的dbprint语句看看。重点删passthru.c里面的
给刚开始学NDIS的一点建议http://www.driverdevelop.com/forum/viewthread.php?tid=67763
游客

返回顶部