The NPs are registered with the MPR by putting entries in the registry.
A REG_SZ value named Order is placed on the following key to list the NPs:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order
Order has a list of named values beneath it in the registry hierarchy, one for each NP. The MPR will load networks (NPs) in the order that the values are enumerated from the registry, which cannot be guaranteed to be any specific order. For example:
Order NetworkA NetworkB NetworkX
Each entry in the list corresponds to another key in the registry, specifically for that network. The subkey can be obtained from the MPR when the NP is loading by calling the NPSGetSectionName service. The entry is a subkey from the registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
Beneath the network specific key, there is a subkey called NetworkProvider under which named values define the NP.
An example network description for the layout of the values is as follows:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetworkA\NetworkProvider Name=network name ProviderPath=provider DLL filename Description=network full description NetID=network identifier CallOrder=MPR order to call
Other network specific entries may be placed in the section, but the first two letters of the names of such values should be SP to avoid conflict with future standard value names.
Each value has the following meaning:
Name - (REG_SZ) the name of the network being provided by the NP. This should be a short name (recommended to be 24 characters or less) that is unique to the network. It is the resource name returned by the MPR when enumerating networks.
ProviderPath - (REG_EXPAND_SZ) the name of the DLL that the NP is implemented within. The MPR will load this DLL and expect the NP functions to be exported from it.
Description - (REG_SZ) a long text description for the network. This is the comment returned by the MPR when enumerating networks, and is displayed as additional information when useful (for example, when installing networks).
NetID - (REG_DWORD) The identifier for the network. It is the high word of the provider type in the network capabilities returned by the NP, represented in hex. It is noted here so that the network does not have to be running to run multi-network aware configuration software (for example, to de-install a network, or to offer installation options when the user is not currently on the network).
Windows31DLL - (REG_DWORD) Set to 1 if the DLL is a (16 bit) Windows 3.1 Winnet Driver. If this value is not present then the DLL defaults to a 32 bit NP implementation as described throughout this document.
CallOrder - (REG_DWORD) A number indicating the order that the provider should be called relative to other NPs. Lower numbered providers are called before higher numbered providers. This value defaults to 0x80000000 for 32 bit NP implementations and to 0xc0000000 for Windows 3.1 Winnet driver implementations. Network providers with the same number are called in the opposite order to which they were loaded. After loading all of the network provider DLLs, MPR calls NPGetCaps for each DLL (for the first time since the DLL was loaded), honoring this call order.
PrinterRedirectionRequired - (REG_DWORD) Set to 1 if a network provider DLL requires a local printer port redirection to use a network printer queue.
ValidPrinters - (REG_DWORD) A 32 bit mask indicating the valid print numbers for redirecting local printer devices, with the lowest order bit corresponding to LPT1. If the NP supports NPValidLocalDevice, then this registry value will be ignored. If the NP does not support NPValidLocalDevice and this field is not present, then the system will assume that all non-used devices can be redirected.
DiskRedirectionRequired - (REG_DWORD) Set to 1 if a network provider DLL requires a local disk drive redirection to access file systems on network servers.
ValidDrives - (REG_DWORD) A 32 bit mask indicating the valid local disk devices for redirecting disk drives, with the lowest order bit corresponding to A:. If the NP supports NPValidLocalDevice, then this registry value will be ignored. If the NP does not support NPValidLocalDevice and this field is not present, then the system will assume that all non-used devices can be redirected.
NetLotLoading - (REG_DWORD) At startup, MPR sets this value to 1 if a network provider DLL fails to load, and deletes the value from the registry if the DLL does load successfully. MPR will not try to load NPs with this value set to 1 after startup, so installers that require a restart for a network to become active should set this value to 1 when installing the network.
ConnectButtonName - (REG_SZ) This is used for a (16 bit) Windows 3.1 Winnet driver that has its own connect or browse dialog boxes. When the network is run in conjunction with 32 bit networks, the common connect dialog box will have a button that brings up the network specific connect or browse dialog box exported from the Winnet driver. This should be a short name (recommended to be 10 characters or less) that fits within the connect dialog box's button. If this field is omitted, then the button text defaults to the value of the Name registry entry above.