怎样编程禁用网卡?我记得有人问过这个问题?谁知道,我很急,万分感谢,UP有分。

killwd 2002-05-11 10:09:02
怎样编程禁用网卡?我记得有人问过这个问题?谁知道,我很急,万分感谢,UP有分。
...全文
89 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
jxk 2002-05-11
  • 打赏
  • 举报
回复
我认为这只是修改注册表的问题
你可以用一些监视组成表的软件看看注册表在禁用网卡之前和禁用网卡之后注册表有什么变化!
no1vcl 2002-05-11
  • 打赏
  • 举报
回复
The ObjectName field contains the name (or name prefix) by which the component is identified by the system. This value must be the same as the name in the related CurrentControlSet\Services subkey. Names for adapters are created by the system and override the Bindform setting.

The first Yes|No pair indicates whether the component is to receive binding information directly in its Linkage subkey. The second Yes|No pair indicates whether the device name is supposed to appear in generated binding strings.


The final optional value in this entry indicates how binding device names are constructed. This value is required for software components.


Class REG_MULTI_SZ


Path: HKEY_LOCAL_MACHINE\Software\Microsoft\Drivername

\CurrentVersion\NetRules


- or -


HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion \NetworkCards\netcard#\NetRules


Range: NewClassName OldClassName|basic [Yes|No]


Allows a component to define a new class. As many new classes as necessary can be defined by any component.

Note: These classes are not related to the COM object data and DDE classes defined under HKEY_LOCAL_MACHINE\Software\Classes.

Class names do not need to be defined within any particular component. The system adds the new definition to its database without regard to origin. The order of Class entries is irrelevant. However, results are indeterminate if classes are referred to that are not defined anywhere in the system.


This entry is optional, because there are a few predefined classes, and class definitions made anywhere in the system apply to all network components. Because any network component can define new classes, be careful that the names used are unique within all possible installable network components. The following list shows the predefined class names in the first release of WindowsNT. This list, of course, cannot be exhaustive.


Predefined class = Adapter card type


ee16Driver; ee16Adapter = Intel EtherExpress 16 LAN adapter

elnkiiAdapter; elinkiiDriver = 3Com Etherlink II adapter

ibmtokDriver; ibmtokAdapter = IBM Token Ring adapter

lanceDriver; dec101Adapter = DEC Lance adapter

lt200Driver; lt200Adapter = Daystar Digital LocalTalk adapter

ne2000Driver; ne2000Adapter = Novell NE2000 adapter

proteonDriver; p1390Adapter = Proteon adapter

ubDriver; ubAdapter = Ungermann-Bass Ethernet NIUpc aapter

wdlanDriver; smcisaAdapter = SMC (WD) adapter


The final optional value indicates whether this class is a "logical endpoint" for the bindings protocol; the default value is NO.


Hidden REG_DWORD


Path: HKEY_LOCAL_MACHINE\Software\Microsoft\Drivername

\CurrentVersion\NetRules


- or -


HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion \NetworkCards\netcard#\NetRules


Range: 0 or 1


Suppresses the display of the component (adapter or network software) in the Network dialog box accessible through Control Panel.

Usually, all networking components discovered in the Registry are displayed in the two list boxes in the Network dialog box. Setting this value to 1 prevents the item from being displayed, which means the user cannot configure or remove it.


Interface REG_MULTI_SZ


Path: HKEY_LOCAL_MACHINE\Software\Microsoft\Drivername

\CurrentVersion\NetRules


- or -


HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion \NetworkCards\netcard#\NetRules


Range: InterfaceName UpperClass "objectName" namingMethod


Allows a single component to make available more than one type of capability to other components in the system. This value contains these components:


InterfaceName The tokenized name of the secondary interface.

UpperClass The class to which the interface belongs. (LowerClass refers to the primary interface.)

ObjectName The WindowsNT device name to be created.

NamingMethod A value that determines how the bindings appear.

Review REG_DWORD


Path: HKEY_LOCAL_MACHINE\Software\Microsoft\Drivername

\CurrentVersion\NetRules


- or -


HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion \NetworkCards\netcard#\NetRules


Range: 0 or 1


Indicates whether a component requests bindings review. If set to 1 (or nonzero), the system reinvokes this component's .inf file after bindings have been changed. Network components can then modify the binding information or request additional information from administrators about the new or altered connections.


Type REG_SZ


Path: HKEY_LOCAL_MACHINE\Software\Microsoft\Drivername

\CurrentVersion\NetRules


- or -


HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion \NetworkCards\netcard#\NetRules


Range: component className [lowerClass]


Defines the type of the component in terms of abstract network component classes. If the optional lowerClass name is absent, the first (or upper-level) class type name is used for both its upper and lower classes. This value is required for network software and network adapter cards. The component types are the following:


Adapter Hardware component

Driver A software component directly associated with a hardware component.

Transport A software component used by services

Service A software component providing capability directly to user applications

Basic A token used to represent a fundamental class name (that is, a class with no parent)

Use REG_SZ


Path: HKEY_LOCAL_MACHINE\Software\Microsoft\Drivername

\CurrentVersion\NetRules


- or -


HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion \NetworkCards\netcard#\NetRules


Range: service|driver|transport|adapter [Yes|No] [Yes|No]


Defines the role played by the component. If this entry is absent, the value of Service is assumed. This value entry only appears for software items.

A hardware device is automatically assumed to be an adapter. Each network component can identify itself as a driver, transport, or service to clarify its role. This distinction is as follows:


Driver Exists only to support one or more adapters. If no bindings are generated (or permitted by the user) that include a particular driver, that driver is not loaded. However, no error is generated, since no "denial of service" has occurred.

Service Provides end-user functionality, and every attempt is made to support its operation. An EventLog entry is generated if a service is present in the system for which there is no available transport (that is, the number of possible bindings is zero).

no1vcl 2002-05-11
  • 打赏
  • 举报
回复
Chapter 14

Network Interfaces and Protocols


In this chapter we will look at the Registry parameters for network adapter cards. Under each adapter card setting, there will also parameters for the adapter card that relate to exclusive protocols. We examine those options as well as the architecture that Windows NT uses for Network drivers: the Network Driver Interface Specification.


NDIS


The base of Microsoft Windows NT's network architecture begins with the Network Driver Interface Specification. This is a Microsoft specification for writing hardware-independent drivers at the media access layer (subcomponent of the OSI data link layer.)


NDIS Drivers


Any network interface card that is NDIS-compatible can pass data to any protocol that is NDIS-compatible. Other network operating systems require a single protocol at a time bound to a Network Interface Card.


NDIS Wrapper


Replaces PROTMAN, which was used in previous implementations of NDIS. The NDIS Wrapper controls all initial access to the NIC. It stores all adapter settings in the Registry.


Card Parameters


WindowsNT supports network adapter drivers under the Network Device Interface Specification (NDIS) 3.0 specification. The following sections describe entries in the other areas of the Registry that contain configuration information for network adapter cards and their drivers, including:


NetRules: subkeys under HKEY_LOCAL_MACHINE\Software subkeys store data for drivers and adapters.
Linkage: subkey entries under HKEY_LOCAL_MACHINE\System subkeys for drivers and adapters, define information about bindings for the component.
Parameters: subkey entries under HKEY_LOCAL_MACHINE\System subkeys for network card adapters, define specific information such as the IRQ number, I/O base address, and other details.

NetRules


The NetRules subkey is located under the following registry path:


HKEY_LOCAL_MACHINE\Software\Microsoft\Drivername\CurrentVersion\NetRules


For network adapter cards, where the netcard# subkey is a number, beginning with 01 for the first network adapter:


HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\NetworkCards\netcard#\NetRules


Bindable REG_MULTI_SZ


Path: HKEY_LOCAL_MACHINE\Software\Microsoft\driverName\

CurrentVersion\NetRules


or -

HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersionNetworkCards\netcard#\NetRules


Range: fromClass toClass Yes|No Yes|No value


Defines a valid binding and its constraints. This value entry is optional, because there are a few predefined binding rules, and binding rules defined anywhere in the system apply to all network component classes. Because this value entry is of type REG_MULTI_SZ, a single value entry is large enough to hold as many criteria for binding as are needed.

The value entry has the following format:

Class1 Class2 Criteria1 Criteria2 …

For example:

Value name: Bindable


Data type: REG_MULTI_SZ

Value: ndisDriver ndisAdapter non exclusive 100


In this example, the components of class "ndisDriver" can be bound to those of class "ndisAdapter." Non indicates that the component of class ndisDriver can accept other bindings. Exclusive indicates that the component of class ndisAdapter cannot accept other bindings. 100 indicates the relative importance (weight) of this binding; that is, in cases of competition, it will be discarded in favor of other bindings whose weight is greater.


Bindform REG_SZ


Path: HKEY_LOCAL_MACHINE\Software\Microsoft\Drivername

\CurrentVersion\NetRules


- or-


HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion \NetworkCards\netcard#\NetRules


Range: ObjectName Yes|No Yes|No [container|simple|streams]

no1vcl 2002-05-11
  • 打赏
  • 举报
回复
基本上修改注册表即可;
以下摘自:
http://www.usv.ro/docm/calculatoare/NT/nt4regpro/cover.htm

WINDOWS NT 4.0 REGISTRY:A Professional Reference
killwd 2002-05-11
  • 打赏
  • 举报
回复
多谢,能解决问题更好,急的不是一般。
ciacia 2002-05-11
  • 打赏
  • 举报
回复
那我就帮你up,up,再up!

16,548

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • AIGC Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧