The NmrRegisterClient function registers a client module with the NMR.
NTSTATUS NmrRegisterClient( PNPI_CLIENT_CHARACTERISTICS ClientCharacteristics, __drv_aliasesMem PVOID ClientContext, PHANDLE NmrClientHandle );
A pointer to an NPI_CLIENT_CHARACTERISTICS structure that describes the characteristics of the client module. The client module must make sure that this structure remains valid and resident in memory as long as the client module is registered with the NMR.
A pointer to a caller-supplied context for the registration. The client module uses this context to keep track of the state of the client registration. The contents of the client module's registration context are opaque to the NMR. The NMR passes this pointer to the client module whenever it calls the client module's ClientAttachProvider callback function. The client module must make sure that its registration context remains valid and resident in memory as long as the client module is registered with the NMR.
A pointer to a variable that receives a handle used by the NMR to represent the registration of the client module. The client module must save this handle and pass it as a parameter to the NmrDeregisterClient function when it deregisters from the NMR.
The NmrRegisterClient function returns one of the following NTSTATUS codes:
||The NMR successfully registered the client module.|
||The NMR did not have sufficient system resources to register the client module.|
||An error occurred.|
A client module calls the NmrRegisterClient function to register as a client of an NPI so that it can attach to provider modules that register as providers of the same NPI.
A client module typically calls the NmrRegisterClient function from its DriverEntry function after it has completed all other initialization tasks. The call to the NmrRegisterClient function indicates to the NMR that the client module is ready to attach to any provider modules that have registered or will register as providers of the same NPI for which the client module has registered as a client.
|Minimum supported client||Available in Windows Vista and later versions of the Windows operating systems.|
|Header||netioddk.h (include Wsk.h)|