Export (0) Print
Expand All
Expand Minimize

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
);

Parameters

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.

Return value

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 codeMeaning
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.

 

Remarks

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winsock2.h

Library

Ws2_32.lib

DLL

Ws2_32.dll

Unicode and ANSI names

WSAGetServiceClassInfoW (Unicode) and WSAGetServiceClassInfoA (ANSI)

See also

Service Class Data Structures
Winsock Reference
Winsock Functions
WSAInstallServiceClass
WSASERVICECLASSINFOW
WSAStartup

 

 

Community Additions

ADD
Show:
© 2015 Microsoft