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

# ldap\_initW(3w)

## NAME

**ldap\_initW** (WLDAP32.@)

## SYNOPSIS

WLDAP32\_LDAP \* CDECL  ldap\_initW\
  (\
   PWCHAR *hostname*,\
   ULONG  *portnumber*\
  )

## DESCRIPTION

Initialize an **LDAP** context and create a **TCP** connection.

## PARAMS

*hostname* **\[In\]**  Name of the host to connect to.

*portnumber* **\[In\]**  Port number to use.

## RETURNS

**Success:** Pointer to an **LDAP** context.

**Failure:** **NULL**.

## NOTES

The *hostname* string can be a space separated string of hostnames, in which case the **LDAP** runtime will try to connect to the hosts in order, until a connection can be made. A *hostname* may have a trailing port number (separated from the *hostname* by a **':'**), which will take precedence over the port number supplied as a parameter to this function. The connection will not be made until the first **LDAP** function that needs it is called.

## IMPLEMENTATION

Declared in **"winldap\_private.h"**.

Implemented in **"dlls/wldap32/init.c"**.
