Digital
驱动牛犊
驱动牛犊
  • 注册日期2001-08-08
  • 最后登录2008-07-08
  • 粉丝0
  • 关注0
  • 积分5分
  • 威望6点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:3705回复:10

怎样自已编程完成类似于PASSTHRU的DRIVER的安装?

楼主#
更多 发布于:2001-09-03 10:45
我看过一些介绍,是说把.SYS和.DLL分别COPY到相应的目录,然后再改注册表,可是在注册表中有一项parameter中的好像是绑定参数这一项怎么确定啊?

最新喜欢:

antspowerantspo...
相信自已!
Fang
驱动牛犊
驱动牛犊
  • 注册日期2001-06-12
  • 最后登录2010-08-10
  • 粉丝0
  • 关注0
  • 积分2分
  • 威望13点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2001-09-06 16:48
大家一起来学吧,我已经提过好几次这个问题了,没人愿意回答。
Digital
驱动牛犊
驱动牛犊
  • 注册日期2001-08-08
  • 最后登录2008-07-08
  • 粉丝0
  • 关注0
  • 积分5分
  • 威望6点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2001-09-06 17:00
现在我搞清楚了注册表内相关项的大开意思和关系,可是最后发现通过一搬的API和手工都无法修改相关表项!
相信自已!
crash
驱动牛犊
驱动牛犊
  • 注册日期2001-08-10
  • 最后登录
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地板#
发布于:2001-09-10 11:33
我也正在做这方面的研究,但苦于资料太少,有没有这方面的资料,恳请高手出招,能不能详细介绍一下做driver安装程序的方法和步骤,有没有好的站点或资料,最好是例子程序什么的。
在黑暗中我将孤独的前行,一无反顾...
zgc
zgc
驱动牛犊
驱动牛犊
  • 注册日期2001-05-23
  • 最后登录
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2001-09-10 15:47
要手工改注册表吗?我好象不用,找一个网卡的inf文件学习一下就是了。
denis
驱动牛犊
驱动牛犊
  • 注册日期2001-07-05
  • 最后登录
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
5楼#
发布于:2001-10-08 14:42
    


Filter Intermediate Driver Installation
This topic provides an overview of NDIS filter intermediate driver installation issues. For additional information about the structure of intermediate driver INF files, see Installation Requirements for Network Filter Intermediate Drivers.

A filter intermediate driver requires two INF files. The protocol INF file defines the installation parameters for the protocol lower edge. The virtual miniport INF file defines the installation parameters for the virtual miniport upper edge. You set the Class INF file entry to Net in the virtual miniport INF file and NetService in the protocol INF file. A sample Class entry for the protocol INF file follows:

Class = NetService

The DDInstall section in a filter intermediate driver INF file must have a Characteristics entry. You define the Characteristics entry in your protocol INF file as demonstrated in the following sample:

Characteristics = 0x410

The 0x410 value indicates that the NCF_FILTER and NCF_NO_SERVICE flags are set. NCF_FILTER is required for filter intermediate drivers. NCF_NO_SERVICE is optional.

You define the Characteristics entry in your virtual miniport INF file as demonstrated in the following sample:

Characteristics = 0x29

The Characteristics value 0x29 indicates the NCF_VIRTUAL (0x1), NCF_HIDDEN (0x8) and NCF_NOT_USER_REMOVABLE (0x20) flags are set. NCF_VIRTUAL specifies that the device is a virtual adapter. NCF_NOT_USER_REMOVABLE is optional and specifies that the user cannot remove the intermediate driver. NCF_HIDDEN is optional. You define NCF_HIDDEN if you want to hide the virtual miniport from the user (you should not do this if your user must install devices manually).

The values of the NCF_* flags are defined in netcfgx.h. For more information about NCF_* flags, see DDInstall Section.

The DDInstall section of the protocol INF file for a filter intermediate driver must include an Addreg directive for an Ndi key. The protocol INF file must specify the Service entry under the Ndi key. The virtual miniport INF file, in turn, contains an AddService directive that references a service-install section. The ServiceName value of this AddService directive must match the name of the protocol INF Service entry. The ServiceBinary entry in the service-install section of the virtual miniport INF file specifies the path to the binary for the filter intermediate driver. During virtual miniport installation, this filter intermediate driver must have been already transferred to the target computer using the CopyFiles directive of the protocol INF file. For more information, see Adding Service-Related Values to the Ndi Key and DDInstall.Services Section.

The following example shows how a filter intermediate driver protocol INF file specifies the name of the service:

HKR, Ndi,            Service,             , Passthru

This name is the name of the driver's service as it is reported to NDIS. Note that the name of a filter intermediate driver's service need not be the same as the name of the binary for the driver although typically they are the same.

The following is an example of how the virtual miniport INF file references the name of the filter intermediate driver's service when it adds that service:

[PassthruMP.ndi.Services]
AddService = Passthru,0x2, PassthruMP.AddService

[PassthruMP.AddService]
DisplayName    = %PassthruMP_Desc%
ServiceType    = 1 ;SERVICE_KERNEL_DRIVER
StartType      = 3 ;SERVICE_DEMAND_START
ErrorControl   = 1 ;SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\passthru.sys
LoadOrderGroup = PNP_TDI

The user installs the protocol INF file. The protocol INF file references the virtual miniport INF from the FilterDeviceInfId INF file entry as follows:

HKR, Ndi,            FilterDeviceInfId,   , ms_passthrump

Define the virtual miniport INF part of the reference as follows:

%PassthruMP_Desc% = PassthruMP.ndi, ms_passthrump

[Strings]
Msft = "Microsoft"
PassthruMP_Desc = "Passthru Miniport"

The FilterDeviceInfld (ms_passthrump in the example) in the protocol INF file must match the name provided in the virtual miniport INF file.

The FilterClass value of a filter intermediate driver determines its order in a stack of filters. Filter intermediate drivers must define the FilterClass key. The class of the driver can be one of the values in the following table:

Value DescriptionMeaning
scheduler Packet-scheduling filter service. This class of filter intermediate driver is the highest driver in a stack. A packet scheduler detects the 802.1p priority classification given to packets by QoS-signaling components, and sends those packets according to their priority levels to underlying drivers.  
loadbalance Load-balancing filter service. This class of filter intermediate driver exists between packet-scheduling and fail-over drivers. A load balancing filter service balances its workload of packet transfers by distributing the workload over its bundle of underlying miniport instances.  
failover Fail-over filter service. This class of filter intermediate driver is the lowest driver in a stack. That is, no other drivers that belong to other classes, if installed, can be between this driver's virtual miniport and the adapter being filtered.  


Note  Only one filter intermediate driver of a specific class can exist in a layered stack of filter intermediate drivers. For example, two filter intermediate drivers of FilterClass "schedule" cannot exist in a stack simultaneously.

A sample FilterClass entry follows:

HKR, Ndi,            FilterClass,         , failover

You must define the following entries in the filter intermediate driver protocol INF file to control the driver bindings:

HKR, Ndi\Interfaces, UpperRange,          , noupper
HKR, Ndi\Interfaces, LowerRange,          , nolower
HKR, Ndi\Interfaces, FilterMediaTypes,    , "ethernet, tokenring, fddi, wan"

For more information about controlling the driver bindings, see Intermediate Driver UpperRange And LowerRange INF File Entries.

A filter intermediate driver does not require a notify object for proper installation. When no notify object DLL is provided, the network class installer completes the installation automatically.

A notify object can be used to provide a user interface for the entry of component specific parameters and configuration information. For more information about creating a notify object, see Intermediate Driver Notify Object.

Adapting the Passthru Sample INF files
The best way to create your own filter intermediate driver INF files is to copy the INF files from the Passthru sample driver and modify them.

To adapt the protocol INF file

Change passthru.sys to the name of your own driver in the SourceDiskFiles and Passthru.CopyFiles.Sys sections.
Change the values for BindForm and MiniportId in the Passthru.ndi.AddReg section to appropriate values.
To adapt the virtual miniport INF file

Replace "MS_PassthruMP" with the InfId of your virtual miniport.
Change ServiceBinary in the PassthruMP.AddService section to the name of your driver.
Change "Passthru" in the PassthruMP.ndi.AddReg section "Service" line to reflect the appropriate name.
Built on Wednesday, July 11, 2001
denis
sirroom
驱动大牛
驱动大牛
  • 注册日期2001-07-30
  • 最后登录2018-05-29
  • 粉丝0
  • 关注0
  • 积分6分
  • 威望11点
  • 贡献值1点
  • 好评度0点
  • 原创分0分
  • 专家分0分
6楼#
发布于:2001-10-15 15:01
最好是谁给个现成的例子附解说
111
noble_shi
驱动牛犊
驱动牛犊
  • 注册日期2003-07-15
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分73分
  • 威望9点
  • 贡献值0点
  • 好评度6点
  • 原创分0分
  • 专家分0分
7楼#
发布于:2004-06-21 20:39
顶以下,请大侠们提供一个例子!
gantleman
驱动小牛
驱动小牛
  • 注册日期2003-10-03
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分13分
  • 威望127点
  • 贡献值1点
  • 好评度18点
  • 原创分0分
  • 专家分0分
8楼#
发布于:2004-06-23 18:54
DDK的例子有一个安装程序,是通过COM接口调用系统。很完整,但说明太少了!我前两天研究了“INFTOOL”(好象是这个名字,就是生成INF文件的哪个)很多关于注册表的东西都很固定,所以没有资料好讨厌。
abest
驱动牛犊
驱动牛犊
  • 注册日期2007-10-20
  • 最后登录2009-09-16
  • 粉丝0
  • 关注0
  • 积分9分
  • 威望21点
  • 贡献值0点
  • 好评度12点
  • 原创分0分
  • 专家分0分
9楼#
发布于:2007-10-27 15:43
我也是找了很久,终于找到一个例子:
http://www.ccg.org.cn/bbs/viewthread.php?tid=285
http://www.asmbbs.com
scroot
驱动牛犊
驱动牛犊
  • 注册日期2006-05-24
  • 最后登录2012-05-18
  • 粉丝0
  • 关注0
  • 积分13分
  • 威望24点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
10楼#
发布于:2012-05-18 09:03
链接打不开了,能不能发我一份,感谢
游客

返回顶部