The WskRegister function registers a WSK application, given the application's WSK client Network Programming Interface (NPI).
NTSTATUS WskRegister( PWSK_CLIENT_NPI WskClientNpi, PWSK_REGISTRATION WskRegistration );
A pointer to the client NPI implemented by the WSK application.
A pointer to a memory location that identifies a WSK application's registration instance. This memory location will be initialized by the WskRegister call and will be used by the other WSK registration functions. The WSK application should never change the contents of this memory location directly.
WskRegister returns one of the following NTSTATUS codes:
||The registration succeeded.|
||The registration failed.|
A WSK client object can call this function multiple times, but a different WskRegistration parameter must be used for each call in order to create multiple registration instances.
For each call to WskRegister that returns a success code, there must be exactly one corresponding WskDeregister call that uses the same WskRegistration parameter that was passed to WskRegister.
The block of memory pointed to by WskRegistration must be kept allocated (must not be freed or go out of scope) as long as there are outstanding calls to other WSK registration functions.
For more information about attaching a WSK application to the WSK subsystem, see Registering a Winsock Kernel Application.
|Minimum supported client||Available in Windows Vista and later versions of the Windows operating systems.|
|Header||wsk.h (include Wsk.h)|