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

# GetBestInterfaceEx(3w)

## NAME

**GetBestInterfaceEx** (IPHLPAPI.@)

## SYNOPSIS

DWORD GetBestInterfaceEx\
  (\
   struct WS\_sockaddr\* *pDestAddr*,\
   PDWORD              *pdwBestIfIndex*\
  )

## DESCRIPTION

Get the interface, with the best route for the given **IP** address.

## PARAMS

dwDestAddr **\[In\]**  **IP** address to search the interface for.

*pdwBestIfIndex* **\[Out\]**  found best interface.

## RETURNS

**Success:** **NO\_ERROR**

**Failure:** error code from Winerror.h

## IMPLEMENTATION

Declared in **"iphlpapi.h"**.

Implemented in **"dlls/iphlpapi/iphlpapi\_main.c"**.

Debug channel **"iphlpapi"**.
