阅读:1143回复:4
急!!DS是否支持Ndis5.1??
我在编译DS的kndis5mp.lib库文件的时候,如果把NDIS50_MINIPORT改成NDIS51_MINIPORT,编译就不能成功。难道说DS不支持Ndis5.1吗?(我用的DS版本是2.6)
|
|
|
沙发#
发布于:2002-08-21 18:33
编译就不能成功。?
嘿嘿。。。。。 贴出来看看吗。。。。。 :) |
|
|
板凳#
发布于:2002-08-21 19:10
这是ds用来编译kndis5mp.lib的sources文件(路径为\\DriverNetWorks\\source\\sources_miniport)
# sources - Compuware Driver Networks Classes #============================================================================= # # Compuware Corporation # NuMega Lab # 9 Townsend West # Nashua, NH 03060 USA # # Copyright (c) 1998 Compuware Corporation. All Rights Reserved. # Unpublished - rights reserved under the Copyright laws of the # United States. # # U.S. GOVERNMENT RIGHTS-Use, duplication, or disclosure by the # U.S. Government is subject to restrictions as set forth in # Compuware Corporation license agreement and as provided in # DFARS 227.7202-1(a) and 227.7202-3(a) (1995), # DFARS 252.227-7013(c)(1)(ii)(OCT 1988), FAR 12.212(a) (1995), # FAR 52.227-19, or FAR 52.227-14 (ALT III), as applicable. # Compuware Corporation. # # This product contains confidential information and trade secrets # of Compuware Corporation. Use, disclosure, or reproduction is # prohibited without the prior express written permission of Compuware # # Corporation. # #============================================================================= !if \"$(CONFIGURATION)\" == \"NDIS_4_MINIPORT\" TARGETNAME=kndis4mp C_DEFINES= -DNDIS40_MINIPORT=1 -DNDIS_MINIPORT_DRIVER !else TARGETNAME=kndis5mp C_DEFINES= -DNDIS50=1 -DNDIS50_MINIPORT=1 -DNDIS_MINIPORT_DRIVER C_DEFINES= -DNDIS51=1 -DNDIS51_MINIPORT=1 -DNDIS_MINIPORT_DRIVER !endif C_DEFINES = $(C_DEFINES) -DCONDITION_HANDLING=1 -DNTVERSION=400 -DKNDIS_LIB_BUILD !IF (\"$(CPU)\" == \"ia64\") || (\"$(CPU)\" == \"IA64\") C_DEFINES = $(C_DEFINES) -DBINARY_COMPATIBLE=0 OBJLIBFILES=$(DRIVERWORKS)\\source\\CRTSEC.OBJ !ELSE C_DEFINES = $(C_DEFINES) -DBINARY_COMPATIBLE=1 !ENDIF !IF (\"$(DDKBUILDENV)\"==\"fre\") || (\"$(DDKBUILDENV)\"==\"free\") NTDEBUG= !ENDIF TARGETPATH=$(DRIVERNETWORKS)\\lib TARGETTYPE=DRIVER_LIBRARY INCLUDES=.\\..\\include;\\ .;\\ .\\include;\\ $(BASEDIR)\\inc;\\ $(BASEDIR)\\inc\\ddk;\\ $(BASEDIR)\\src\\network\\inc;\\ .\\..\\include\\stl;\\ .\\..\\include\\stl\\ndis;\\ $(DRIVERWORKS)\\include SOURCES=kndiscpp.cpp \\ kndislist.cpp \\ kndisoiddebug.cpp \\ kndispacket.cpp \\ kndisprotocolbinding.cpp \\ kndisrequest.cpp \\ kndistrace.cpp \\ KNdisBundle.cpp \\ kndisfilteradapter.cpp \\ Kndisfilterbinding.cpp \\ Kndisinterrupt.cpp \\ Kndisminidriver.cpp \\ kndispacketstransfer.cpp \\ kndisparamresource.cpp \\ kndispciresource.cpp \\ kndispnpresource.cpp \\ kndisreceivearea.cpp \\ KndisBufferHeap.cpp \\ kndissharedmemory.cpp 如果使用蓝色部分编译,则一切正常。但是如果使用红色部分编译,那么就会出现n多的错误。 我看了一下编译纪录,都是说KNdisMiniAdapter.h文件里第495行: void KNdisMiniAdapter::SendComplete( #ifndef KNDIS_WAN_MINIPORT IN PNDIS_PACKET Packet, IN NDIS_STATUS Status) { NdisMSendComplete(*this, Packet, Status); } 不能将KNdisMiniAdapter类型转化为PNDIS_MINIPORT_BLOCK类型。 想不明白为什么5.0可以转化,5.1就不能转化了。 如果DS支持不了Ndis5.1的话,那整个驱动都得用DDK重写了。 快救救我呀!! |
|
|
地板#
发布于:2002-08-22 13:30
具体的我知道,偶只能帮你顶顶!
不过xp下的passthru中有这样: #ifdef NDIS51_MINIPORT #define PASSTHRU_MAJOR_NDIS_VERSION 5 #define PASSTHRU_MINOR_NDIS_VERSION 1 《-- #else #define PASSTHRU_MAJOR_NDIS_VERSION 4 #define PASSTHRU_MINOR_NDIS_VERSION 0 #endif #ifdef NDIS51 #define PASSTHRU_PROT_MAJOR_NDIS_VERSION 5 #define PASSTHRU_PROT_MINOR_NDIS_VERSION 0 《-- #else #define PASSTHRU_PROT_MAJOR_NDIS_VERSION 4 #define PASSTHRU_PROT_MINOR_NDIS_VERSION 0 #endif NDIS51 NDIS51_MINIPORT 分开处理的。 :( |
|
|
地下室#
发布于:2002-08-23 08:59
呵呵,问题找到了。
在KNdisMiniAdapter.h的Ln149: #if defined(NDIS40_MINIPORT) || defined(NDIS50_MINIPORT) inline operator PNDIS_MINIPORT_BLOCK () const { return (PNDIS_MINIPORT_BLOCK)m_Handle; } #endif 原来DS已经重定义PNDIS_MINIPORT_BLOCK操作符了。怪不得在NDIS50下可以编译通过,到了NDIS51就不行了。ft 不过还是非常感谢老大的热心帮助!! |
|
|