The NmrDeregisterProvider function deregisters a provider module from the NMR.
NTSTATUS NmrDeregisterProvider( HANDLE NmrProviderHandle );
A handle used by the NMR to represent the registration of the provider module. The NMR returns this handle to the provider module when the provider module calls the NmrRegisterProvider function.
The NmrDeregisterProvider function returns one of the following NTSTATUS codes:
||The NMR initiated the deregistration of the provider module. The provider module must call the NmrWaitForProviderDeregisterComplete function to wait until the deregistration is complete before the provider module can be unloaded.|
||An error occurred.|
When a provider module calls the NmrDeregisterProvider function, the NMR calls the provider module's ProviderDetachClient callback function and the client module's ClientDetachProvider callback function for each of the bindings between the provider module and a client module. The deregistration of the provider module from the NMR is complete after the provider module has successfully detached from all the client modules to which it is attached and all of those client modules have successfully detached from the provider module.
A provider module typically calls the NmrDeregisterProvider function from its Unload function to detach itself from all of the client modules to which it is attached before the provider module is unloaded from the system. After calling the NmrDeregisterProvider function a provider module must call the NmrWaitForProviderDeregisterComplete function to wait for the deregistration to complete before the provider module can be unloaded. A provider module must not return from a call to its Unload function until after deregistration is complete.
|Minimum supported client||Available in Windows Vista and later versions of the Windows operating systems.|
|Header||netioddk.h (include Wsk.h)|
Send feedback about: