NmrRegisterProvider function (netioddk.h)
The NmrRegisterProvider function registers a provider module with the NMR.
Syntax
NTSTATUS NmrRegisterProvider(
[in] PNPI_PROVIDER_CHARACTERISTICS ProviderCharacteristics,
[in] __drv_aliasesMem PVOID ProviderContext,
[out] PHANDLE NmrProviderHandle
);
Parameters
[in] ProviderCharacteristics
A pointer to an NPI_PROVIDER_CHARACTERISTICS structure that describes the characteristics of the provider module. The provider module must make sure that this structure remains valid and resident in memory as long as the provider module is registered with the NMR.
[in] ProviderContext
A pointer to a caller-supplied context for the registration. The provider module uses this context to keep track of the state of the provider registration. The contents of the provider module's registration context are opaque to the NMR. The NMR passes this pointer to the provider module whenever it calls the provider module's ProviderAttachClient callback function. The provider module must make sure that this context remains valid and resident in memory as long as the provider module is registered with the NMR.
[out] NmrProviderHandle
A pointer to a variable that receives a handle used by the NMR to represent the registration of the provider module. The provider module must save this handle and pass it as a parameter to the NmrDeregisterProvider function when it deregisters from the NMR.
Return value
The NmrRegisterProvider function returns one of the following NTSTATUS codes:
Return code | Description |
---|---|
|
The NMR successfully registered the provider module. |
|
The NMR did not have sufficient system resources to register the provider module. |
|
An error occurred. |
Remarks
A provider module calls the NmrRegisterProvider function to register as a provider of an NPI so that it can attach to client modules that register as clients of the same NPI.
A provider module typically calls the NmrRegisterProvider function from its DriverEntry function after it has completed all other initialization tasks. The call to the NmrRegisterProvider function indicates to the NMR that the provider module is ready to attach to any client modules that have registered or will register as clients of the same NPI for which the provider module has registered as a provider.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available in Windows Vista and later versions of the Windows operating systems. |
Target Platform | Desktop |
Header | netioddk.h (include Wsk.h) |
Library | Netio.lib |
IRQL | PASSIVE_LEVEL |