|
GetNameByType
Important The GetNameByType function is a Microsoft-specific extension to the Windows Sockets 1.1
specification. This function is obsolete. For the convenience of Windows Sockets 1.1
developers, the reference material is below.
In Windows Sockets 2, this functionality is realized with the functions
detailed in Protocol-Independent Name Resolution.
The GetNameByType function obtains the name of a network service. The network service is
specified by its service type.
INT GetNameByType(
LPGUID lpServiceType,
| // points to network service type GUID
| LPTSTR lpServiceName,
| // points to buffer to receive name of network service
| DWORD dwNameLength
| // points to variable that specifies buffer size
| );
|
|
Parameters
lpServiceType
Points to a globally unique identifier (GUID) that specifies the type of the network service. The header file SVCGUID.H
includes definitions of several GUID service types, and macros for working with them.
lpServiceName
Points to a buffer to receive a zero-terminated string that uniquely
represents the name of the network service.
dwNameLength
Points to a variable that, on input, specifies the size of the buffer pointed
to by lpServiceName. On output, the variable contains the actual size of the service name string.
Return Values
If the function succeeds, the return value is not SOCKET_ERROR ( 1).
If the function fails, the return value is SOCKET_ERROR ( 1). To get extended error information, call GetLastError.
See Also
GetTypeByName
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|