Wince下如何卸载WIFI driver
最近在使用RT2870这个型号的WIFI时,发现进入suspend或者turn off,OS就有几率当机。上网搜了一下,大家都说是WIFI driver的power management没做好,所以打算在关机之前先卸载driver,看是否能解决问题。
WIFI driver是NDIS driver(这个真心不懂,也是从注册表看到一点信息),但是发现不会卸载,网上有找到卸载流驱动的方式,但是这种NDIS的不会卸载。以下是注册表信息,希望哪位大侠给出一段简单的code能实现卸载。(急等)
[HKEY_LOCAL_MACHINE\Comm\RT2870]
"DisplayName"="RT2870 b/g/n Wireless LAN Driver"
"Group"="NDIS"
"ImagePath"="RT2870.dll"
[HKEY_LOCAL_MACHINE\Drivers\USB\LoadClients\Default\Default\Default\RT2870]
"Dll"="RT2870.DLL"
[HKEY_LOCAL_MACHINE\Drivers\USB\ClientDrivers\RT2870]
"Dll"="RT2870.DLL"
[HKEY_LOCAL_MACHINE\Comm\RT28701\Parms]
"BusNumber"=dword:0
"BusType"=dword:0
"OpMode"=dword:0
"WirelessMode"=dword:9
"Channel"=dword:1
"CountryRegion"=dword:5
"CountryRegionABand"=dword:7
"RtsThresh"=dword:92B
"FragThresh"=dword:92A
"Encryption"=dword:1
"AuthenType"=dword:0
"Radio"=dword:0
"ShowHiddenSSID"=dword:0
"AutoReconnect"=dword:1
"NetworkType"=dword:1
"SSID"=multi_sz:"RT2870"
"TxBurst"=dword:0
"AdhocOfdm"=dword:0
"FrameAggregation"=dword:0
"RDG"=dword:1
"AllowBW40InBGBand"=dword:1
"PSPXlink"=dword:0
"BACapability"=dword:07034020
"TransmitSetting"=dword:2ba15
"ProviderName"=multi_sz:"Ralink Technology, Inc."
"VendorDesc"=multi_sz:"RT2870 802.11 b/g Wireless Card."
"WEPKeyUse"=dword:1
"WEPKeyLen"=dword:0
"WEPKey1"=multi_sz:""
"WEPKey2"=multi_sz:""
"WEPKey3"=multi_sz:""
"WEPKey4"=multi_sz:""
[HKEY_LOCAL_MACHINE\Comm\RT28701\Parms\TcpIp]
"EnableDHCP"=dword:1
"DefaultGateway"=multi_sz:"192.168.2.254"
"IpAddress"=multi_sz:"192.168.2.234"
"Subnetmask"=multi_sz:"255.255.255.0"
"DNS"=""
"WINS"=""
;
; Strong recommend install 2007M6 QFE, if you want to higer USB performance
;
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCI\Template\EHCI]
"IntThreshCtrl"=dword:1 ; 1~8 microframe ( 1 microframe = 125us)
[解决办法]
1.BOOL Unload(const TSTRING &strDev)
2.{
3. BOOL bRes = FALSE;
4.
5. HANDLE hFind = INVALID_HANDLE_VALUE;
6. __try
7. {
8. if(strDev.empty() != FALSE)
9. {
10. __leave;
11. }
12.
13. //确定搜索的方式
14. DeviceSearchType searchType;
15. if(strDev[strDev.size() - 1] == ':')
16. {
17. searchType = DeviceSearchByLegacyName;
18. }
19. else
20. {
21. searchType = DeviceSearchByDeviceName;
22. }
23.
24. DEVMGR_DEVICE_INFORMATION devInfo = {0};
25. devInfo.dwSize = sizeof(devInfo);
26.
27. //寻找驱动的句柄
28. hFind = FindFirstDevice(searchType,strDev.c_str(),&devInfo);
29. if(hFind == INVALID_HANDLE_VALUE)
30. {
31. __leave;
32. }
33.
34. //卸载驱动
35. bRes = DeactivateDevice(devInfo.hDevice);
36. }
37. __finally
38. {
39. FindClose(hFind);
40. }
41.
42. return bRes;
43.
44.}
试试这种方法。
[解决办法]
RT2870这个驱动在wince6.0下的S5PV210平台的驱动你有吗?能共享一下吗?
[解决办法]
基于WinCE的无线网卡配置方法
WiFi Card RT2870芯片在WinCE的驱动
[解决办法]
删除即可
[解决办法]
删除后,需要使用再动态加载