Helper Functions in the SPI

The NSPGetServiceClassInfo function retrieves service class schema information that has been retained by a namespace provider. It is also used by the Windows Sockets 2 DLL in its implementation of WSAGetServiceClassNameByClassId.

The following macros defined in the Svcguid.h header file and can aid in mapping between well known service classes and these namespaces.

Macro name Description
SVCID_TCP(Port)
SVCID_UDP(Port)
Given a TCP or UDP port for the Internet protocol, returns the GUID.
IS_SVCID_TCP(GUID)
IS_SVCID_UDP(GUID)
Returns TRUE if the GUID for TCP or UDP is within the allowable range.
PORT_FROM_SVCID_TCP(GUID)
PORT_FROM_SVCID_UDP(GUID)
Returns the TCP or UDP port associated with the GUID.
SVCID_NETWARE(SAPID)
Given the Service Advertising Protocol (SAP) identifier, returns the GUID. This macro is used with the SAP namespace within a NetWare environment.
SAPID_FROM_SVCID_NETWARE(GUID)
Returns the NetWare SAP identifier associated with the GUID. This macro is used with the SAP namespace within a NetWare environment.
IS_SVCID_NETWARE(GUID)
Returns TRUE if the GUID for NetWare is within the allowable range. This macro is used with the SAP namespace within a NetWare environment.

 

Note

The Svcguid.h header file is not automatically included by the Winsock2.h header file.