Skip to content

Latest commit

 

History

History
116 lines (89 loc) · 3.73 KB

nf-nspapi-gettypebynamea.md

File metadata and controls

116 lines (89 loc) · 3.73 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:nspapi.GetTypeByNameA
GetTypeByNameA function (nspapi.h)
The GetTypeByName function retrieves a service type GUID for a network service specified by name. (ANSI)
GetTypeByNameA
nspapi/GetTypeByNameA
winsock\gettypebyname_2.htm
WinSock
177bbae5-bc00-4ce5-a0f7-8474f0c2cb2e
12/05/2018
GetTypeByName, GetTypeByName function [Winsock], GetTypeByNameA, GetTypeByNameW, _win32_gettypebyname_2, nspapi/GetTypeByName, nspapi/GetTypeByNameA, nspapi/GetTypeByNameW, winsock.gettypebyname_2
nspapi.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
GetTypeByNameW (Unicode) and GetTypeByNameA (ANSI)
Mswsock.lib
Mswsock.dll
Windows
19H1
GetTypeByNameA
nspapi/GetTypeByNameA
c++
APIRef
kbSyntax
DllExport
Mswsock.dll
GetTypeByName
GetTypeByNameA
GetTypeByNameW

GetTypeByNameA function

-description

The GetTypeByName function retrieves a service type GUID for a network service specified by name.

Note  The GetTypeByName 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, this reference material is included. The functions detailed in Protocol-Independent Name Resolution provide equivalent functionality in Windows Sockets 2.
 

-parameters

-param lpServiceName [in]

A pointer to a zero-terminated string that uniquely represents the name of the service. For example, "MY SNA SERVER."

-param lpServiceType [in, out]

A pointer to a variable to receive a globally unique identifier (GUID) that specifies the type of the network service. The Svcguid.h header file includes definitions of several GUID service types and macros for working with them.

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

-returns

If the function succeeds, the return value is zero.

If the function fails, the return value is SOCKET_ERROR( – 1). To get extended error information, call GetLastError, which returns the following extended error value.

Value Meaning
ERROR_SERVICE_DOES_NOT_EXIST
The specified service type is unknown.

-see-also

GetNameByType

Winsock Functions

Winsock Reference

-remarks

Note

The nspapi.h header defines GetTypeByName as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.