---
name: "Tspi_Context_Connect"
section: "3"
platform: "linux"
package: "libtspi-dev"
version: "0.3.15-0.4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Tspi_Context_Connect"
---

# Tspi\_Context\_Connect(3)

## NAME

Tspi\_Context\_Connect- connect a TSP to a Core Services daemon

## SYNOPSIS

**#include \<tss/platform.h\>** **#include \<tss/tcpa\_defines.h\>** **#include \<tss/tcpa\_typedef.h\>** **#include \<tss/tcpa\_struct.h\>** **#include \<tss/tss\_typedef.h\>** **#include \<tss/tss\_structs.h\>** **#include \<tss/tspi.h\>** **TSS\_RESULT Tspi\_Context\_Connect(TSS\_HCONTEXT** *hLocalContext***, UNICODE\*** *wszDestination***);**

## DESCRIPTION

**Tspi\_Context\_Connect** creates a connetion between the application and the local or remote TSS System.

## PARAMETERS

### hLocalContext

The handle to the context to be connected.

### wszDestination

A null terminated unicode string which specifies  the local or remote system to which one will be connected. If *wszDestination* is NULL, the connection will be to a local TCS.

## RETURN CODES

**Tspi\_Context\_Connect** returns TSS\_SUCCESS on success, otherwise one of the following values are returned: TSS\_E\_INVALID\_HANDLE - *hLocalContext* is an invalid handle. TSS\_E\_INTERNAL\_ERROR - An error occurred internal to the TSS.

## CONFORMING TO

**Tspi\_Context\_Connect** conforms to the Trusted Computing Group Software Specification version 1.1 Golden

## SEE ALSO

[**Tspi\_Context\_Create**(3)](/Tspi_Context_Create/3.md), [**Tspi\_Context\_Close**(3)](/Tspi_Context_Close/3.md).
