wavelight
驱动老牛
驱动老牛
  • 注册日期2002-08-15
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:2025回复:22

这些错误的原因会是什么??有分!

楼主#
更多 发布于:2002-11-21 14:46
以下是我摘录的部分错误!
造成这些错误会是因为什么原因呢???还请各位赐教!谢先!

pnp.c(141) : error C4013: \'PnpQueryRemoveDeviceHandler\' undefined; assuming ext
rn returning int
pnp.c(144) : error C4013: \'PnpSurpriseRemovalHandler\' undefined; assuming exter
 returning int
pnp.c(147) : error C4013: \'PnpRemoveDeviceHandler\' undefined; assuming extern r
turning int
pnp.c(150) : error C2223: left of \'->Paused\' must point to struct/union
pnp.c(151) : error C2223: left of \'->IODisabled\' must point to struct/union
pnp.c(152) : error C4013: \'PnpDefaultHandler\' undefined; assuming extern return
ng int
pnp.c(155) : error C4013: \'PnpStopDeviceHandler\' undefined; assuming extern ret
rning int
pnp.c(159) : error C2223: left of \'->Paused\' must point to struct/union
pnp.c(160) : error C2223: left of \'->IODisabled\' must point to struct/union
pnp.c(166) : error C4013: \'UnlockDevice\' undefined; assuming extern returning i
t
pnp.c(180) : error C2146: syntax error : missing \';\' before identifier \'dx\'
pnp.c(180) : error C2146: syntax error : missing \';\' before identifier \'fdo\'
pnp.c(181) : error C2275: \'PIO_STACK_LOCATION\' : illegal use of this type as an
expression
<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我cool 故我在!<br></b></font></table> [img]http://www.driverdevelop.com/forum/upload/wavelight/2002-12-13_1.gif[/img]<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我在 故我cool!<br></b></font></table>
ydyuse
驱动老牛
驱动老牛
  • 注册日期2002-07-25
  • 最后登录2005-03-26
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2002-11-21 15:10
PnpQueryRemoveDeviceHandler
PnpSurpriseRemovalHandler
等函数应该在你的PNP.C中有定义呀!
生命驱动,活力无限!
wavelight
驱动老牛
驱动老牛
  • 注册日期2002-08-15
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2002-11-21 16:10
PnpQueryRemoveDeviceHandler
PnpSurpriseRemovalHandler
等函数应该在你的PNP.C中有定义呀!
 


对啊,我的pnp.c里面已经有这些定义了
<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我cool 故我在!<br></b></font></table> [img]http://www.driverdevelop.com/forum/upload/wavelight/2002-12-13_1.gif[/img]<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我在 故我cool!<br></b></font></table>
ydyuse
驱动老牛
驱动老牛
  • 注册日期2002-07-25
  • 最后登录2005-03-26
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地板#
发布于:2002-11-21 16:21
那把你的SOURCE贴出来看一下。
生命驱动,活力无限!
wavelight
驱动老牛
驱动老牛
  • 注册日期2002-08-15
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2002-11-21 16:24
还有这些错误,都莫名其妙 ! :(
pnp.c(217) : error C2223: left of \'->Paused\' must point to struct/union
pnp.c(218) : error C2223: left of \'->IODisabled\' must point to struct/union
pnp.c(228) : error C2146: syntax error : missing \';\' before identifier \'dx\'
pnp.c(228) : error C2146: syntax error : missing \';\' before identifier \'fdo\'
pnp.c(232) : error C4013: \'PnpStopDevice\' undefined; assuming extern returning i
nt :(
<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我cool 故我在!<br></b></font></table> [img]http://www.driverdevelop.com/forum/upload/wavelight/2002-12-13_1.gif[/img]<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我在 故我cool!<br></b></font></table>
wavelight
驱动老牛
驱动老牛
  • 注册日期2002-08-15
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
5楼#
发布于:2002-11-21 16:27
这是我的source  文件:
TARGETNAME=gamepad
TARGETTYPE=DRIVER
DRIVERTYPE=WDM
TARGETPATH=obj

TARGETLIBS=$(DDK_LIB_PATH)\\hidclass.lib \\
           $(DDK_LIB_PATH)\\ntoskrnl.lib

INCLUDES=..\\inc;..\\..\\inc
        
SOURCES=gamepad.c       \\
        pnp.c           \\
        deviceio.c         \\
        hid.c          \\
        dispatch.c        \\
debugprint.c    \\
        gamepad.rc
<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我cool 故我在!<br></b></font></table> [img]http://www.driverdevelop.com/forum/upload/wavelight/2002-12-13_1.gif[/img]<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我在 故我cool!<br></b></font></table>
ydyuse
驱动老牛
驱动老牛
  • 注册日期2002-07-25
  • 最后登录2005-03-26
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
6楼#
发布于:2002-11-21 16:28
pnp.c(217) : error C2223: left of \'->Paused\' must point to struct/union
pnp.c(218) : error C2223: left of \'->IODisabled\' must point to struct/union
pnp.c(228) : error C2146: syntax error : missing \';\' before identifier \'dx\'
pnp.c(228) : error C2146: syntax error : missing \';\' before identifier \'fdo\'
pnp.c(232) : error C4013: \'PnpStopDevice\' undefined; assuming extern returning i

这些都是具体代码错误,你自己检查一下了。
error C2223: left of \'->Paused\' must point to struct/union
->Paused前面应是一个结构/联合。等等。
生命驱动,活力无限!
wavelight
驱动老牛
驱动老牛
  • 注册日期2002-08-15
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
7楼#
发布于:2002-11-21 16:30

这是source文件:
TARGETNAME=gamepad
TARGETTYPE=DRIVER
DRIVERTYPE=WDM
TARGETPATH=obj

TARGETLIBS=$(DDK_LIB_PATH)\\hidclass.lib \\
           $(DDK_LIB_PATH)\\ntoskrnl.lib

INCLUDES=..\\inc;..\\..\\inc
        
SOURCES=gamepad.c       \\
        pnp.c           \\
        deviceio.c         \\
        hid.c          \\
        dispatch.c        \\
debugprint.c    \\
        gamepad.rc
<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我cool 故我在!<br></b></font></table> [img]http://www.driverdevelop.com/forum/upload/wavelight/2002-12-13_1.gif[/img]<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我在 故我cool!<br></b></font></table>
ydyuse
驱动老牛
驱动老牛
  • 注册日期2002-07-25
  • 最后登录2005-03-26
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
8楼#
发布于:2002-11-21 16:34
这是我的source  文件:
TARGETNAME=gamepad
TARGETTYPE=DRIVER
DRIVERTYPE=WDM
TARGETPATH=obj

TARGETLIBS=$(DDK_LIB_PATH)\\hidclass.lib \\
           $(DDK_LIB_PATH)\\ntoskrnl.lib

INCLUDES=..\\inc;..\\..\\inc
        
SOURCES=gamepad.c       \\
        pnp.c           \\
        deviceio.c         \\
        hid.c          \\
        dispatch.c        \\
debugprint.c    \\
        gamepad.rc

改:

INCLUDES=$(BASEDIR)\\inc;..\\inc;..\\..\\inc

生命驱动,活力无限!
wavelight
驱动老牛
驱动老牛
  • 注册日期2002-08-15
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
9楼#
发布于:2002-11-21 16:34


这些都是具体代码错误,你自己检查一下了。
error C2223: left of \'->Paused\' must point to struct/union
->Paused前面应是一个结构/联合。等等。


象dx->Paused 这种只是我在设备扩展里定义的一个标志位而已。

比如还有错误:missing \';\' before identifier \'dx\'
  可是我的程序里并不存在这些错误啊?  :( :(
<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我cool 故我在!<br></b></font></table> [img]http://www.driverdevelop.com/forum/upload/wavelight/2002-12-13_1.gif[/img]<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我在 故我cool!<br></b></font></table>
ydyuse
驱动老牛
驱动老牛
  • 注册日期2002-07-25
  • 最后登录2005-03-26
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
10楼#
发布于:2002-11-21 16:37
改后应该无错误了?
生命驱动,活力无限!
wavelight
驱动老牛
驱动老牛
  • 注册日期2002-08-15
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
11楼#
发布于:2002-11-21 16:43
改后应该无错误了?


 :(
还是不行!!! 我已经弄了三天了    :( :( :(
<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我cool 故我在!<br></b></font></table> [img]http://www.driverdevelop.com/forum/upload/wavelight/2002-12-13_1.gif[/img]<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我在 故我cool!<br></b></font></table>
ydyuse
驱动老牛
驱动老牛
  • 注册日期2002-07-25
  • 最后登录2005-03-26
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
12楼#
发布于:2002-11-21 16:46
加了INCLUDES=$(BASEDIR)\\inc;
错误还是那样?
生命驱动,活力无限!
wavelight
驱动老牛
驱动老牛
  • 注册日期2002-08-15
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
13楼#
发布于:2002-11-21 16:47
加了INCLUDES=$(BASEDIR)\\inc;
错误还是那样?


对啊,我已经加上去了! 还是有好多的错误!!  :(
<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我cool 故我在!<br></b></font></table> [img]http://www.driverdevelop.com/forum/upload/wavelight/2002-12-13_1.gif[/img]<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我在 故我cool!<br></b></font></table>
ncspirit
驱动牛犊
驱动牛犊
  • 注册日期2002-11-20
  • 最后登录2002-12-13
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
14楼#
发布于:2002-11-21 16:48
我有一次碰到过类似的情况。
是语法错误导致的,好像是struct声明时u写成了v?
记不清了,反正是敲错了一个键。:D
最郁闷的是编译器没有给出正确提示。

不知道你的问题也是类似情况?
建议仔细查查语法、拼写。
ydyuse
驱动老牛
驱动老牛
  • 注册日期2002-07-25
  • 最后登录2005-03-26
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
15楼#
发布于:2002-11-21 16:57
我有一次碰到过类似的情况。
是语法错误导致的,好像是struct声明时u写成了v?
记不清了,反正是敲错了一个键。:D
最郁闷的是编译器没有给出正确提示。

不知道你的问题也是类似情况?
建议仔细查查语法、拼写。  


我现在也只有这个建议了。要不你对照我给你的文件琢磨一下。
再不行,再说!
生命驱动,活力无限!
wavelight
驱动老牛
驱动老牛
  • 注册日期2002-08-15
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
16楼#
发布于:2002-11-21 17:05
我觉得是不是在引用头文件(.h)的时候有什么问题!
因为还提示有下面的错误:

error C2275: \'NTSTATUS\' : illegal use of this type as an expression

   NTSTATUS 不是DDK 里面定义的吗? 
    怎么成了不合法了 ??   :(
<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我cool 故我在!<br></b></font></table> [img]http://www.driverdevelop.com/forum/upload/wavelight/2002-12-13_1.gif[/img]<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我在 故我cool!<br></b></font></table>
ydyuse
驱动老牛
驱动老牛
  • 注册日期2002-07-25
  • 最后登录2005-03-26
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
17楼#
发布于:2002-11-21 17:09
我觉得是不是在引用头文件(.h)的时候有什么问题!
因为还提示有下面的错误:

error C2275: \'NTSTATUS\' : illegal use of this type as an expression

   NTSTATUS 不是DDK 里面定义的吗? 
    怎么成了不合法了 ??   :(


老兄,它不是说未定义,只是用法有误呀!
你是这样用的
  NTSTATUS status;

加油!在下班前搞定!
生命驱动,活力无限!
wavelight
驱动老牛
驱动老牛
  • 注册日期2002-08-15
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
18楼#
发布于:2002-11-21 17:10
我在gamepad.h 中如下引用NTDDK\\inc中的.h文件:

#ifdef __cplusplus
extern \"C\"
{
#endif
#include \"wdm.h\"
#include \"hidclass.h\"
#include \"hidusage.h\"
#include \"hidpi.h\"
#include \"wdmguid.h\"
#ifdef __cplusplus
}
#endif
这不应该会有问题吧?
<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我cool 故我在!<br></b></font></table> [img]http://www.driverdevelop.com/forum/upload/wavelight/2002-12-13_1.gif[/img]<table style="filter: glow(color=red, strength=6)"><br><font color=white><b>我在 故我cool!<br></b></font></table>
ydyuse
驱动老牛
驱动老牛
  • 注册日期2002-07-25
  • 最后登录2005-03-26
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
19楼#
发布于:2002-11-21 17:16
我在gamepad.h 中如下引用NTDDK\\inc中的.h文件:

#ifdef __cplusplus
extern \"C\"
{
#endif
#include \"wdm.h\"
#include \"hidclass.h\"
#include \"hidusage.h\"
#include \"hidpi.h\"
#include \"wdmguid.h\"
#ifdef __cplusplus
}
#endif
这不应该会有问题吧?


YES!我觉得是你CODE有问题。你再检查检查!
生命驱动,活力无限!
上一页
游客

返回顶部