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

# GetServiceA(3w)

## NAME

**GetServiceA** (WSOCK32.1119)

## SYNOPSIS

INT GetServiceA\
  (\
   DWORD                *dwNameSpace*,\
   LPGUID               *lpGuid*,\
   LPSTR                *lpServiceName*,\
   DWORD                *dwProperties*,\
   LPVOID               *lpBuffer*,\
   LPDWORD              *lpdwBufferSize*,\
   LPSERVICE\_ASYNC\_INFO *lpServiceAsyncInfo*\
  )

## DESCRIPTION

Get information about a network service.

## PARAMS

*dwNameSpace* **\[In\]**  Name space or set of name spaces within which the function.

will operate.

*lpGuid* **\[In\]**  Pointer to **GUID** of network service type.

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

of the service.

*dwProperties* **\[In\]**  Flags specifying which information to return in *lpBuffer*.

*lpBuffer* **\[Out\]**  Pointer to buffer where the function returns an array.

of **NS\_SERVICE\_INFO**.

*lpdwBufferSize* **\[In/Out\]**  Size of *lpBuffer*. A greater number on output.

indicates an error.

*lpServiceAsyncInfo* **\[Out\]**  Reserved. Set to **NULL**.

## RETURNS

**Success:** **0.**

**Failure:** **SOCKET\_ERROR**. **[GetLastError(3w)](/GetLastError/3w.md)** returns **ERROR\_INSUFFICIENT\_BUFFER** or **ERROR\_SERVICE\_NOT\_FOUND**.

## 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"**.
