The WskCaptureProviderNPI function captures a provider Network Programming Interface (NPI) when it becomes available from the WSK subsystem.
NTSTATUS WskCaptureProviderNPI( PWSK_REGISTRATION WskRegistration, ULONG WaitTimeout, PWSK_PROVIDER_NPI WskProviderNpi );
The time, in milliseconds, that the WskCaptureProviderNPI function can wait until the WSK provider NPI becomes available. Alternately, the following can be specified:
Return from this function immediately if the provider NPI is not available.
Wait until the provider NPI is available from the WSK subsystem.
For more information about how this parameter is used, see Registering a Winsock Kernel Application.
A pointer to the NPI returned by the WSK provider. This WSK_PROVIDER_NPI structure contains a pointer to the WSK provider dispatch table of WSK functions that the WSK application can call.
WskCaptureProviderNPI returns one of the following NTSTATUS codes:
||The provider NPI capture completed successfully.|
||The provider NPI was not yet available.|
||The version requested by the WSK client is not supported by the WSK subsystem.|
||The provider NPI capture failed.|
For each call to WskCaptureProviderNPI that returns a success code, there must be exactly one corresponding WskReleaseProviderNPI call that uses the same WskRegistration parameter that was passed to WskCaptureProviderNPI.
WskCaptureProviderNPI can be called after a call is made to WskDeregister only if the WskRegistration block is not freed or overwritten. After WskDeregister is called, any further calls to WskCaptureProviderNPI will fail with status code STATUS_DEVICE_NOT_READY, and, unless the provider NPI becomes available concurrently, any existing WskCaptureProviderNPI calls that are blocked in other threads waiting for the WSK provider NPI to become available will also return immediately with status code STATUS_DEVICE_NOT_READY.
For more information about attaching a WSK application to the WSK subsystem, see Registering a Winsock Kernel Application.
Callers of the WskCaptureProviderNPI function must be running at IRQL = PASSIVE_LEVEL if WaitTimeout is not set to WSK_NO_WAIT; otherwise, callers must be running at IRQL <= DISPATCH_LEVEL.
|Minimum supported client||Available in Windows Vista and later versions of the Windows operating systems.|
|Header||wsk.h (include Wsk.h)|
|IRQL||PASSIVE_LEVEL (see Remarks section)|