阅读:1475回复:6
求救!Win2k下的CreateFile
请问,Win2k下,同样在98下成功的CreateFile调用,为什么出现,无效的内存分配????谢谢!!!或者应该怎样使用。如有有效解决办法。给分呀!!
|
|
沙发#
发布于:2003-07-14 16:13
It must be the problem of your win2k device driver.
Did you use win2000 DDK for developing device driver? Since it is different from win98, we can\'t use win98 device driver directly. So you have to review your device driver. For most of cases, we can open the device with \"CreateFile\" unless the device driver failed. Also, you can go to www.beyondlogic.org to find some driver testing tools. It may help checking device driver. The URL: http://www.beyondlogic.org/dddtools/dddtools.htm |
|
|
板凳#
发布于:2003-07-15 15:45
Thanks!But When I used CreateFile to open other objects such as simply an ordinary file which would never fail, it also failed! But under the VC IDE it did work! The case I precedingly failed was under VB. The driver was written by myself and it functioned well in 98 and the error message in 2k was the same as that of any other objects when opened with CreateFile in 2k.
And I don\'t know how to give you the score. |
|
地板#
发布于:2003-07-15 16:26
2k和9x体系架构都不相同,如果你所用98DDK开发的驱动在2K下不能正常运行,则原因很多,但通常是兼容性问题,如果你所用WDM或许在2K下可运行,但不能保证所有功能正确,通常你需要写2个Driver,当然如果你的Driver很简单,所用WDM规范实现,兼容98和2K也是可能的
|
|
|
地下室#
发布于:2003-07-17 15:05
这位说的很对.我知道.问题是,即便不打开驱动.直接,用CreateFile打开一个普通文件,都失败.两千下.
|
|
5楼#
发布于:2003-07-17 15:13
老兄,两者的参数有不同的要求的。
|
|
6楼#
发布于:2003-07-18 14:42
可是我见到的是一样的呀.请问能不能大概指出不同?2000对于这个函数好像没有什么挑剔呀.
|
|