---
name: "GetTypeByNameA"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/GetTypeByNameA"
---

# GetTypeByNameA(3w)

## NAME

**GetTypeByNameA** (WSOCK32.1113)

## SYNOPSIS

INT GetTypeByNameA\
  (\
   LPSTR  *lpServiceName*,\
   LPGUID *lpServiceType*\
  )

## DESCRIPTION

Retrieve a service type **GUID** for a network service specified by name.

## PARAMS

*lpServiceName* **\[In\]**  NUL-terminated **ASCII** string that uniquely represents the name of the service.

*lpServiceType* **\[Out\]**  Destination for the service type **GUID**.

## RETURNS

**Success:** **0.** *lpServiceType* contains the requested **GUID**

**Failure:** **SOCKET\_ERROR**. **[GetLastError(3w)](/GetLastError/3w.md)** can return **ERROR\_SERVICE\_DOES\_NOT\_EXIST**.

## NOTES

Obsolete Microsoft-specific extension to Winsock **1.1.** Protocol-independent name resolution provides equivalent functionality in Winsock **2.**

## BUGS

Unimplemented

## IMPLEMENTATION

Declared in **"nspapi.h"**.

Implemented in **"dlls/wsock32/service.c"**.

Debug channel **"winsock"**.
