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




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


[out] Sevice name.


[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

The specified ServiceClassName buffer is too small. Pass in a larger buffer
the specified ServiceClassId is invalid.
The Windows Sockets 2 DLL has not been initialized. The application must first call WSAStartup before calling any Windows Sockets functions.

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database