WSAGetServiceClassNameByServiceClassId  2MOTKYE

The Windows Sockets WSAGetServiceClassNameByServiceClassId function returns the name of the service associated with the given type. This name is the generic service name, like FTP or SNA, and not the name of a specific instance of that service.

INT WSAGetServiceClassNameByServiceClassId(

    LPGUID lpServiceClassId,

 

    LPTSTR lpszServiceClassName,

 

    LPDWORD lpdwBufferLength

 

   );

 

 

Parameters

lpServiceClassId

[in] Pointer to the GUID for the service class.

lpszServiceClassName

[out] Sevice name.

lpdwBufferLength

[in/out] On input length of buffer returned by lpszServiceClassName. On output, the length of the service name copied into lpszServiceClassName.

 

Return Values

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

Error Codes

WSAEFAULT

The specified ServiceClassName buffer is too small. Pass in a larger buffer

WSA_INVALID_PARAMETER

the specified ServiceClassId is invalid.

WSANOTINITIALIZED

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