NPI_PROVIDER_DETACH_CLIENT_FN - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// netioddk.h

NPI_PROVIDER_DETACH_CLIENT_FN NpiProviderDetachClientFn;

NTSTATUS NpiProviderDetachClientFn(
  [in] PVOID ProviderBindingContext
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-netioddk-npi_provider_detach_client_fn)

NPI_PROVIDER_DETACH_CLIENT_FN callback function

Description

A provider module's ProviderDetachClient callback function detaches the provider module from a client module.

Parameters

ProviderBindingContext [in]

A pointer to the provider module's context for the binding between the provider module and the client module from which it is detaching. The provider module's ProviderAttachClient callback function returns this pointer to the NMR when it attaches to the client module.

Return value

A provider module's ProviderDetachClient callback function returns one of the following NTSTATUS codes:

Return code Description
STATUS_SUCCESS The provider module successfully detached from the client module.
STATUS_PENDING The provider module could not detach from the client module immediately.

Remarks

The NMR calls a provider module's ProviderDetachClient callback function whenever the binding between the provider module and a client module needs to be terminated. Detachment is initiated by either the client module calling the NmrDeregisterClient function or the provider module calling the NmrDeregisterProvider function.

After its ProviderDetachClient callback function has been called, a provider module should not make any more calls to any of the client module's NPI callback functions. If there are no in-progress calls to any of the client module's NPI callback functions when the provider module's ProviderDetachClient callback function is called, then the provider module's ProviderDetachClient callback function returns STATUS_SUCCESS.

If there are in-progress calls to one or more of the client module's NPI callback functions when the provider module's ProviderDetachClient callback function is called, the provider module's ProviderDetachClient callback function returns STATUS_PENDING. In this situation, the provider module must call the NmrProviderDetachClientComplete function after all in-progress calls to the client module's NPI callback functions have completed. The call to the NmrProviderDetachClientComplete function notifies the NMR that detachment from the client module is complete.

The NMR calls the client module's ClientCleanupBindingContext callback function and the provider module's ProviderCleanupBindingContext callback function after both the client module and the provider module have completed detaching from each other.

The NMR calls a provider module's ProviderDetachClient callback function at any IRQL <= DISPATCH_LEVEL.

See also

ClientCleanupBindingContext

NPI_PROVIDER_CHARACTERISTICS

NmrDeregisterClient

NmrDeregisterProvider

NmrProviderDetachClientComplete

ProviderAttachClient

ProviderCleanupBindingContext