包含模板RNDIS INF之后的netrndis.inf文件出错 [英] Error in included netrndis.inf file following template RNDIS INF

查看:88
本文介绍了包含模板RNDIS INF之后的netrndis.inf文件出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过USB设备为以太网写入INF文件并使用Remote NDIS INF模板。 http://msdn.microsoft.com/en-us/library/bb500930.aspx

模板的以下部分表明必须包含它。

;切勿删除NETRNDIS.INF的以下参考文件 include = netrndis.inf
需要= Usb_Rndis.ndi

当我们的设备安装完毕后(插件 - n-play),Windows安装我们的INF,其中包括netrndis.inf,它在第99行给出错误:
ServiceBinary =%12%\usb8023x.sys

文件usb8023x。 System32 / drivers文件夹中不存在sys。这导致错误0xe0000217,导致我们的设备无法安装。

我们是否需要包含netrndis.inf?我们怎样才能让它在不失败的情况下运行?

INF需要在Win XP,2003,Vista,2008上运行。

这是我们INF的样子:登记/>
;我们公司
;基于远程NDIS模板设备设置文件,用于RNDIS-over-USB主机驱动程序。
[版本]
签名=" $ Windows NT $"
类=网络
ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318}
提供者=%公司%
年份驾驶员= 08/10 / 2009,1.0.0.1


[生产商] ]%公司%=公司,NT.5.1,NTx86.6.0


[公司]
; NetChip ID,由两种固件模式使用
%UsbEnetDevice%= RNDIS,USB \VID_1adb& PID_0003


[Company.NT.5.1]
%UsbEnetDevice%= RNDIS.NT.5.1,USB \VID_1adb& PID_0003


[Company.NTx86.6.0]
%UsbEnetDevice%= RNDIS.NT.5.1,USB \ VID_1adb& PID_0003


[ControlFlags]
ExcludeFromSelect = *


[RNDIS.NT.5.1]
特征= 0x84; NCF_PHYSICAL + NCF_HAS_UI
BusType = 15
DriverVer = 04/30 / 2009,1.0.0.0
AddReg = RNDIS_AddReg_51,RNDIS_AddReg_Common


[RNDIS.NT。 5.1。服务]
include = netrndis.inf
needs = Usb_Rndis.ndi.Services
AddService = USB_RNDIS,2,RNDIS_ServiceInst_51,RNDIS_EventLog


[RNDIS_ServiceInst_51 ]
DisplayName =%ServiceDisplayName%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary =%12%\usb8023.sys
LoadOrderGroup = NDIS
AddReg = RNDIS_WMI_AddReg_51


[RNDIS_WMI_AddReg_51]
HKR ,, MofImagePath,0x00020000,"System32 \ drivers {\\ rndismp.sys"


[RNDIS_AddReg_51]
HKR,Ndi,服务,0,"USB_RNDIS",HKR,Ndi \Interfaces,UpperRange,0," ndi S5"
HKR,Ndi \Interfaces,LowerRange,0,"ethernet"


[RNDIS_EventLog]
AddReg = RNDIS_EventLog_AddReg


[RNDIS_EventLog_AddReg]
HKR ,, EventMessageFile,0x00020000," %% SystemRoot %% \ System32 \ netevent.dll"
HKR ,, TypesSupported,0x00010001,7


[RNDIS_AddReg_Common]
HKR,NDI\params \ NetworkAddress,ParamDesc,0,%NetworkAddress%
HKR,NDI \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
HKR,NDI \params \ NetworkAddress,LimitText,0," 12"
HKR,NDI \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ NDI \params \NetworkAddress,默认值,0," "
HKR,NDI\params\NetworkAddress,optional,0," 1"


[SourceDisksNames]
1 =%SourceDisk%,, 1


[SourceDisksFiles]


[DestinationDirs]
DefaultDestDir = 12


[Strings]
ServiceDisplayName ="USB远程NDIS网络设备驱动程序"
网络地址="网络地址"
公司="我们的公司"和"UsbEnetDevice ="USB以太网/ RNDIS小工具"
SourceDisk ="以太网/ RNDIS小工具驱动程序安装盘"

如果我注释掉"include = netrndis.inf"这一行。它似乎工作。不包括netrndis.inf可以吗?

谢谢!

大卫

解决方案

固定它。不得不移动


包括= netrndis.inf
需要= Usb_Rndis.ndi.Services

到[RNDIS.NT.5.1]部分。

Writing an INF file for an Ethernet over USB device and using the Remote NDIS INF template. http://msdn.microsoft.com/en-us/library/bb500930.aspx

The following section of the template indicates it must be included.

; NEVER REMOVE THE FOLLOWING REFERENCE FOR NETRNDIS.INF
include         = netrndis.inf
needs           = Usb_Rndis.ndi

When our device is installed (plug-n-play), Windows installs our INF, which includes netrndis.inf, which gives an error at line 99:
ServiceBinary   = %12%\usb8023x.sys

The file usb8023x.sys does not exist in System32/drivers folder. This results in error 0xe0000217, resulting in our device failing to install.

Do we need to include netrndis.inf? How can we get it to run without failing?

The INF needs to work on Win XP, 2003, Vista, 2008.

Here is what our INF looks like:

; Our Company
; Based on Remote NDIS template device setup file for the RNDIS-over-USB host driver.
[Version]
Signature           = "$Windows NT$"
Class               = Net
ClassGUID           = {4d36e972-e325-11ce-bfc1-08002be10318}
Provider            = %Company%
DriverVer           = 08/10/2009,1.0.0.1

[Manufacturer]
%Company%          = Company,NT.5.1, NTx86.6.0

[Company]
; NetChip IDs, used by both firmware modes
%UsbEnetDevice%  = RNDIS, USB\VID_1adb&PID_0003

[Company.NT.5.1]
%UsbEnetDevice%  = RNDIS.NT.5.1, USB\VID_1adb&PID_0003

[Company.NTx86.6.0]
%UsbEnetDevice%  = RNDIS.NT.5.1, USB\VID_1adb&PID_0003

[ControlFlags]
ExcludeFromSelect=*

[RNDIS.NT.5.1]
Characteristics = 0x84   ; NCF_PHYSICAL + NCF_HAS_UI
BusType         = 15
DriverVer       = 04/30/2009,1.0.0.0
AddReg          = RNDIS_AddReg_51, RNDIS_AddReg_Common

[RNDIS.NT.5.1.Services]
include         = netrndis.inf
needs           = Usb_Rndis.ndi.Services
AddService      = USB_RNDIS, 2, RNDIS_ServiceInst_51, RNDIS_EventLog

[RNDIS_ServiceInst_51]
DisplayName     = %ServiceDisplayName%
ServiceType     = 1
StartType       = 3
ErrorControl    = 1
ServiceBinary   = %12%\usb8023.sys   
LoadOrderGroup  = NDIS
AddReg          = RNDIS_WMI_AddReg_51

[RNDIS_WMI_AddReg_51]
HKR, , MofImagePath, 0x00020000, "System32\drivers\rndismp.sys"

[RNDIS_AddReg_51]
HKR, Ndi,               Service,        0, "USB_RNDIS"
HKR, Ndi\Interfaces,    UpperRange,     0, "ndis5"
HKR, Ndi\Interfaces,    LowerRange,     0, "ethernet"

[RNDIS_EventLog]
AddReg = RNDIS_EventLog_AddReg

[RNDIS_EventLog_AddReg]
HKR, , EventMessageFile, 0x00020000, "%%SystemRoot%%\System32\netevent.dll"
HKR, , TypesSupported,   0x00010001, 7

[RNDIS_AddReg_Common]
HKR, NDI\params\NetworkAddress, ParamDesc,  0, %NetworkAddress%
HKR, NDI\params\NetworkAddress, type,       0, "edit"
HKR, NDI\params\NetworkAddress, LimitText,  0, "12"
HKR, NDI\params\NetworkAddress, UpperCase,  0, "1"
HKR, NDI\params\NetworkAddress, default,    0, " "
HKR, NDI\params\NetworkAddress, optional,   0, "1"

[SourceDisksNames]
1=%SourceDisk%,,1

[SourceDisksFiles]

[DestinationDirs]
DefaultDestDir = 12

[Strings]
ServiceDisplayName    = "USB Remote NDIS Network Device Driver"
NetworkAddress        = "Network Address"
Company                = "Our Company"
UsbEnetDevice      = "USB Ethernet/RNDIS Gadget"
SourceDisk            = "Ethernet/RNDIS Gadget Driver Install Disk"

If I comment out the line "include = netrndis.inf" it seems to work. Is it OK to not include netrndis.inf?

Thanks!

David

解决方案

Fixed it. Had to move

include         = netrndis.inf
needs           = Usb_Rndis.ndi.Services

to the [RNDIS.NT.5.1] section.


这篇关于包含模板RNDIS INF之后的netrndis.inf文件出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆