本文介绍了无法加载NDIS minort驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

         我是WinCE驱动程序开发的新手,我们正在为wifi驱动程序工作,我们刚刚创建了一个带有printf语句的NDIS DriverEntry函数,我们已经在Debug模式下构建它。驱动程序DLL未加载。

          I am new to WinCE Driver Development we are working for wifi driver, we have just created a NDIS DriverEntry function with a printf statement and we have build it in Debug mode. driver DLL was not loading.

以下是plotform.reg文件条目

the following is plotform.reg file entries

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\ABC]
    "Dll" = "abc.dll"
    "Order" = dword:1B
    "Prefix" = "PWL"
    "Index"=dword:2

[HKEY_LOCAL_MACHINE\Comm\ABC]
	"DisplayName"="PWL"
	"Group"="NDIS"
	"ImagePath"="abc.dll"	

以下是加载DLL时的调试消息

this following are Debug messages while loading DLL

553 PID:400002 TID:9e0006 OSAXST1: >>> Loading Module 'abc.dll' (0x9E43F3E0) at address 0xEDFD0000-0xEDFD5000 in Process 'NK.EXE' (0x8819FAD0)
PB Debugger Loaded symbols for 'C:\WINCE700\OSDESIGNS\abc.DLL'
   8580 PID:400002 TID:9e0006 NDIS DriverEntry.....

   8582 PID:400002 TID:9e0006 Warning! Kernel DLL 'abc.dll' is registered for thread creation/deletion notification.  To improve performance if you dont need thread notifications call DisableThreadLibraryCalls from inside
   8583 PID:400002 TID:9e0006 ERROR! DEVMGR: Failed to load 'Drivers\BuiltIn\abc'. dwStatus=0x1
   8584 PID:400002 TID:9e0006 OSAXST1: <<< Unloading Module 'abc.dll' (0x9E43F3E0) at address 0xEDFD0000-0xEDFD5000 in Process 'NK.EXE' (0x8819FAD0)
PB Debugger Unloaded symbols for 'C:\WINCE700\OSDESIGNS\abc.DLL'




能告诉你如何解决这个问题。


Can you please tell how to solve this one.

推荐答案

BOOL WINAPI DllEntry(HANDLE hinstDll, ULONG Reason, LPVOID Reserved)
{
    switch(Reason)
    {
    case DLL_PROCESS_ATTACH:
        RETAILREGISTERZONES((HMODULE)hinstDll);
        DEBUGMSG(ZONE_FUNCTION, (TEXT("DllMain(): dll attach.\r\n")));
        // don't need thread attach/detach messages
        DisableThreadLibraryCalls ((HMODULE)hinstDll);
        break;

    case DLL_PROCESS_DETACH:
        DEBUGMSG(ZONE_FUNCTION, (TEXT("DllMain(): dll detach.\r\n")));
        break;
    }
    return TRUE;
}

在DriverEntry函数中设置断点,这是NDIS调用的第一个入口点。然后单步执行代码,看看出了什么问题。启用更多日志区域也有帮助,

Set a breakpoint at the DriverEntry function which is the first entry point for NDIS to call. Then step through the code and see what goes wrong. enabling more log zones also helps,





这篇关于无法加载NDIS minort驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-22 20:55