// netioddk.h
typedef struct _NPI_REGISTRATION_INSTANCE {
USHORT Version;
USHORT Size;
PNPIID NpiId;
PNPI_MODULEID ModuleId;
ULONG Number;
const VOID *NpiSpecificCharacteristics;
} NPI_REGISTRATION_INSTANCE;
View the official Windows Driver Kit DDI referenceNo description available.
The NPI_REGISTRATION_INSTANCE structure defines the data related to the registration of a network module with the NMR.
VersionThe version of the NMR with which the network module is registering. A network module should set this member to zero.
SizeThe size, in bytes, of the NPI_REGISTRATION_INSTANCE structure.
NpiIdA pointer to the NPI identifier for the specific NPI to which the network module is registering as either a client or a provider. The NPIID data type is defined as:
typedef GUID NPIID;
typedef CONST NPIID *PNPIID;
ModuleIdA pointer to an NPI_MODULEID structure that uniquely identifies the network module.
NumberThe implementation number of the NPI for which the network module is registering as either a client or a provider. A network module can support multiple implementations of the same NPI by registering as either a client or a provider of each implementation of the NPI. If there is only one implementation of an NPI, this member is set to zero.
NpiSpecificCharacteristicsA pointer to a structure that specifies characteristics that are unique to the network module. The contents of the structure are NPI-specific. A network module should set this member to NULL if it is registering as a client of an NPI that does not define a client characteristics structure or if it is registering as a provider of an NPI that does not define a provider characteristics structure.
An NPI_REGISTRATION_INSTANCE structure is a member of the NPI_CLIENT_CHARACTERISTICS and NPI_PROVIDER_CHARACTERISTICS structures. These structures are used for registering network modules with the NMR.
When the NMR calls a client module's ClientAttachProvider callback function, it passes a pointer to the NPI_REGISTRATION_INSTANCE structure for the provider module to which the client module can attach itself. Likewise, when the NMR calls a provider module's ProviderAttachClient callback function, it passes a pointer to the NPI_REGISTRATION_INSTANCE structure for the client module to which the provider module can attach itself.
A network module must make sure that the memory for the NPIID pointed to by the NpiId member, the memory for the NPI_MODULEID structure pointed to by the ModuleId member, and the memory for the NPI-specific characteristics structure pointed to by the NpiSpecificCharacteristics member remain valid and resident in memory as long as the network module is registered with the NMR.