阅读:1239回复:1
NdisReadNetworkAddress 出错?我用下面的代码在协议驱动里面读网卡的地址,不知道为什么 NdisReadNetworkAddress 在2000下就返回status Unsucess,XP下面就直接蓝苹了 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //打开注册表 NdisOpenProtocolConfiguration(&status,&ConfigHanlde,&open->AdapterName); if (status != NDIS_STATUS_SUCCESS || ConfigHanlde == NULL) { DebugPrint(("NdisOpenProtocolConfiguration faild")); Irp->IoStatus.Information = 0; Irp->IoStatus.Status = status; IoCompleteRequest (Irp, IO_NO_INCREMENT); IoDecrement(open); return status; } NdisReadNetworkAddress(&status,&NetworkAddress,&NetworkAddressLength,ConfigHanlde); if ((status == NDIS_STATUS_SUCCESS) && (NetworkAddressLength == NUIO_MAC_ADDR_LEN)) { ETH_COPY_NETWORK_ADDRESS(CurrentAddress,NetworkAddress); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Windbg显示的结果是: KERNEL_MODE_EXCEPTION_NOT_HANDLED_M (1000008e) This is a very common bugcheck. Usually the exception address pinpoints the driver/function that caused the problem. Always note this address as well as the link date of the driver/image that contains this address. Some common problems are exception code 0x80000003. This means a hard coded breakpoint or assertion was hit, but this system was booted /NODEBUG. This is not supposed to happen as developers should never have hardcoded breakpoints in retail code, but ... If this happens, make sure a debugger gets connected, and the system is booted /DEBUG. This will let us see why this breakpoint is happening. Arguments: Arg1: c0000005, The exception code that was not handled Arg2: f98c53c5, The address that the exception occurred at Arg3: f7edf994, Trap Frame Arg4: 00000000 |
|
沙发#
发布于:2007-07-02 14:11
把!analyze -v的结果贴上来,贴全
|
|