Share via


NSPV2_ROUTINE Structure

The NSPV2_ROUTINE structure contains information on the functions implemented by a namespace service provider version-2 (NSPv2) provider.

Hinweis  The Ws2spi.h header file structure contains complete prototypes for all the NSPV2 function pointers.

Syntax

typedef struct _NSPV2_ROUTINE {
  DWORD                       cbSize;
  DWORD                       dwMajorVersion;
  DWORD                       dwMinorVersion;
   LPNSPV2STARTUP             NSPv2Startup;
  LPNSPV2CLEANUP              NSPv2Cleanup;
  LPNSPV2LOOKUPSERVICEBEGIN   NSPv2LookupServiceBegin;
  LPNSPV2LOOKUPSERVICENEXTEX  NSPv2LookupServiceNextEx;
  LPNSPV2LOOKUPSERVICEEND     NSPv2LookupServiceEnd;
  LPNSPV2SETSERVICEEX         NSPv2SetServiceEx;
  LPNSPV2CLIENTSESSIONRUNDOWN NSPv2ClientSessionRundown;
} NSPV2_ROUTINE, *PNSPV2_ROUTINE;

Mitglieder

  • cbSize
    Typ: DWORD

    The size, in bytes, of the structure.

  • dwMajorVersion
    Typ: DWORD

    The major version of the service provider specification supported by this provider.

  • dwMinorVersion
    Typ: DWORD

    The minor version of the service provider specification supported by this provider.

  • NSPv2Startup
    Typ: LPNSPV2STARTUP

    A pointer to the NSPv2Startup function for this NSPv2 provider.

  • NSPv2Cleanup
    Typ: LPNSPV2CLEANUP

    A pointer to the NSPv2Cleanup function for this NSPv2 provider.

  • NSPv2LookupServiceBegin
    Typ: LPNSPV2LOOKUPSERVICEBEGIN

    A pointer to the NSPv2LookupServiceBegin function for this NSPv2 provider.

  • NSPv2LookupServiceNextEx
    Typ: LPNSPV2LOOKUPSERVICENEXTEX

    A pointer to the NSPv2LookupServiceNextEx function for this NSPv2 provider.

  • NSPv2LookupServiceEnd
    Typ: LPNSPV2LOOKUPSERVICEEND

    A pointer to the NSPv2LookupServiceEnd function for this NSPv2 provider.

  • NSPv2SetServiceEx
    Typ: LPNSPV2SETSERVICEEX

    A pointer to the NSPv2SetServiceEx function for this NSPv2 provider.

  • NSPv2ClientSessionRundown
    Typ: LPNSPV2CLIENTSESSIONRUNDOWN

    A pointer to the NSPv2ClientSessionRundown function for this NSPv2 provider.

Hinweise

The NSPV2_ROUTINE structure is used as part of the namespace service provider version-2 (NSPv2) architecture available on Windows Vista and later.

On Windows Vista and Windows Server 2008, the NSPV2_ROUTINE structure can only be used for operations on NS_EMAIL namespace providers.

The WSAAdvertiseProvider function advertises an instance of a NSPv2 provider for clients to find. The WSAAdvertiseProvider caller passes a pointer to an NSPV2_ROUTINE structure in the pNSPv2Routine parameter with the NSPv2 entry points supported by the provider.

A NSPv2 provider is required to implement the following functions:

All other functions are optional, dependent on the requirements of the NSPv2 provider.

If a function isn't implemented, then calls to that function should be intercepted by a stub function that returns WSAEOPNOTSUPP. The NSPv2 function pointer to the unimplemented function in the NSPV2_ROUTINE structure should point be to the stub function.

In general, NSPv2 providers are implemented in processes other than the calling applications. NSPv2 providers are not activated as a result of client activity. Each provider hosting application decides when to make a specific provider available or unavailable by calling the WSAAdvertiseProvider and WSAUnadvertiseProvider functions. The client activity only results in attempts to contact the provider, when available (when the namespace provider is advertised).

A process can implement and advertise multiple providers at the same time. Windows Sockets will manage the namespace providers by dispatching calls to the correct one. It will also hide RPC interface details and translates cross-process calls into in-process calls. So that the NSPv2 provider has only to implement a table of entry point functions similar to the NSP_ROUTINE structure used by an NSPv1 provider. A NSPv2 provider does not have to worry about RPC specific requirements (data marshalling and serialization, for example).

The WSAUnadvertiseProvider function makes a specific namespace provider no longer available for clients.

Anforderungen

Mindestens unterstützter Client

Windows Vista

Mindestens unterstützter Server

Windows Server 2008

Header

Ws2spi.h

Siehe auch

NSP_ROUTINE

NSPv2Cleanup

NSPv2ClientSessionRundown

NSPv2LookupServiceBegin

NSPv2LookupServiceEnd

NSPv2LookupServiceNextEx

NSPv2SetServiceEx

NSPv2Startup

WSAAdvertiseProvider

WSAProviderCompleteAsyncCall

WSAQUERYSET2

WSAUnadvertiseProvider