WSAGetServiceClassInfo Function

The WSAGetServiceClassInfo function retrieves the class information (schema) pertaining to a specified service class from a specified namespace provider.

Syntax

INT WSAGetServiceClassInfo(
  __in     LPGUID lpProviderId,
  __in     LPGUID lpServiceClassId,
  __inout  LPDWORD lpdwBufferLength,
  __out    LPWSASERVICECLASSINFO lpServiceClassInfo
);

Parameter

  • lpProviderId [in]
    A pointer to a GUID that identifies a specific namespace provider.

  • lpServiceClassId [in]
    A pointer to a GUID identifying the service class.

  • lpdwBufferLength [in, out]
    On input, the number of bytes contained in the buffer pointed to by the lpServiceClassInfo parameter.

    On output, if the function fails and the error is WSAEFAULT, this parameter specifies the minimum size, in bytes, of the buffer pointed to lpServiceClassInfo needed to retrieve the record.

  • lpServiceClassInfo [out]
    A pointer to a WSASERVICECLASSINFO structure that contains the service class information from the indicated namespace provider for the specified service class.

Rückgabewert

The return value is zero if the WSAGetServiceClassInfo was successful. Otherwise, the value SOCKET_ERROR is returned, and a specific error number can be retrieved by calling WSAGetLastError.

Error code Meaning
WSA_NOT_ENOUGH_MEMORY

There was insufficient memory to perform the operation.

WSAEACCES

The calling routine does not have sufficient privileges to access the information.

WSAEFAULT

The buffer pointed to by the lpServiceClassInfo parameter is too small to contain a WSASERVICECLASSINFOW. The application needs to pass in a larger buffer.

WSAEINVAL

The specified service class identifier or namespace provider identifier is not valid. This error is returned if the lpProviderId, lpServiceClassId, lpdwBufSize, or lpServiceClassInfo parameters are NULL.

WSAEOPNOTSUPP

The operation is not supported for the type of object referenced. This error is returned by some namespace providers that do not support getting service class information.

WSANO_DATA

The requested name is valid, but no data of the requested type was found.

WSANOTINITIALISED

The WS2_32.DLL has not been initialized. The application must first call WSAStartup before calling any Windows Sockets functions.

WSATYPE_NOT_FOUND

The specified class was not found.

 

Hinweise

The WSAGetServiceClassInfo function retrieves service class information from a namespace provider. The service class information retrieved from a particular namespace provider might not be the complete set of class information that was specified when the service class was installed. Individual namespace providers are only required to retain service class information that is applicable to the namespaces that they support. See the section Service Class Data Structures for more information.

Anforderungen

Mindestens unterstützter Client

Windows 2000 Professional

Mindestens unterstützter Server

Windows 2000 Server

Header

Winsock2.h

Bibliothek

Ws2_32.lib

DLL

Ws2_32.dll

Unicode- und ANSI-Namen

WSAGetServiceClassInfoW (Unicode) and WSAGetServiceClassInfoA (ANSI)

Siehe auch

Service Class Data Structures

Winsock Reference

Winsock Functions

WSAInstallServiceClass

WSASERVICECLASSINFOW

WSAStartup