阅读:2187回复:2
求教:Miniport虚拟网卡的注册问题?
我做了一个虚拟Miniport网卡(Win2000),不跟硬件打交道,下层为WDM接口。驱动安装后,设备显示有问题(小黄灯),不知什么原因,请各位大侠指点,小弟谢了先。
Miniport注册部分代码如下: static NDIS_STATUS RegisterAsMiniport( IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath ) { NDIS_STATUS Status; NDIS_MINIPORT_CHARACTERISTICS MiniportChars; DBGPRINT(("%s","RegisterAsMiniport!")); . // // Clear out the characteristics structure before starting NdisZeroMemory(&MiniportChars, sizeof(NDIS_MINIPORT_CHARACTERISTICS)); // // Initialize the Miniport Characteristics Table // MiniportChars.MajorNdisVersion = 4; MiniportChars.MinorNdisVersion = 0; MiniportChars.Reserved = 0; MiniportChars.InitializeHandler = BTInitialize; MiniportChars.QueryInformationHandler = NULL;// BTQueryInformation; MiniportChars.SetInformationHandler = NULL;//BTSetInformation; // // Unused Handlers // MiniportChars.HaltHandler = BTHalt; //=BTHalt ? MiniportChars.ResetHandler = BTReset; //=BTReset ? MiniportChars.TransferDataHandler = NULL; MiniportChars.ReconfigureHandler = NULL; MiniportChars.DisableInterruptHandler = NULL; MiniportChars.EnableInterruptHandler = NULL; MiniportChars.HandleInterruptHandler = NULL; MiniportChars.ISRHandler = NULL; MiniportChars.CheckForHangHandler = NULL; MiniportChars.ReturnPacketHandler = BTReturnPacket; MiniportChars.SendPacketsHandler = BTSendPackets; MiniportChars.AllocateCompleteHandler = NULL; MiniportChars.SendHandler = NULL; // // Call NDIS To Register As A Miniport // Status=NdisMRegisterMiniport( g_BTWrapperHandle, &MiniportChars, sizeof(MiniportChars)); return Status; } // RegisterAsMiniport 是否Miniport网卡注册时一定要给硬件信息?在安装网卡时操作系统是如何运作的。 小弟不胜感激! |
|
最新喜欢:linwn |
沙发#
发布于:2001-08-25 09:34
还是注册问题,发现注册时没有调用BTInitialize函数,不知为什么?望大侠指点,小弟谢了先!
|
|
板凳#
发布于:2001-08-26 10:57
1。调用过NdisMInitializeWrapper函数吗
2。要网卡驱动正常运行 queryinfo setinfo 这两个函数是必须注册的 |
|
|