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

# SetServiceA(3w)

## NAME

**SetServiceA** (WSOCK32.1117)

## SYNOPSIS

INT SetServiceA\
  (\
   DWORD                *dwNameSpace*,\
   DWORD                *dwOperation*,\
   DWORD                *dwFlags*,\
   LPSERVICE\_INFOA      *lpServiceInfo*,\
   LPSERVICE\_ASYNC\_INFO *lpServiceAsyncInfo*,\
   LPDWORD              *lpdwStatusFlags*\
  )

## DESCRIPTION

Register or unregister a network service with one or more namespaces.

## PARAMS

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

*dwOperation* **\[In\]**  Operation to perform.

*dwFlags* **\[In\]**  Flags to modify the function's operation.

*lpServiceInfo* **\[In\]**  Pointer to a **ASCII** SERVICE\_INFO structure.

*lpServiceAsyncInfo* **\[In\]**  Reserved for future use. Must be **NULL**.

*lpdwStatusFlags* **\[Out\]**  Destination for function status information.

## RETURNS

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

**Failure:** **SOCKET\_ERROR**. **[GetLastError(3w)](/GetLastError/3w.md)** can return **ERROR\_ALREADY\_REGISTERED**.

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