---
name: "Tspi_Context_CloseObject"
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_CloseObject"
---

# Tspi\_Context\_CloseObject(3)

destroy resources associated with an object handle.

## NAME

Tspi\_Context\_CloseObject - destroy resources associated with an object handle.

## 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\_CloseObject(TSS\_HCONTEXT** *hContext***, TSS\_HOBJECT** *hObject***);**

## DESCRIPTION

**TSS\_Context\_CloseObject** destroys the object associated with the object handle. All allocated resources associated within the object are also released.

## PARAMETERS

### hContext

The handle of the context object.

### hObject

The handle of the object to be destroyed.

## RETURN CODES

**Tspi\_Context\_CloseObject** returns TSS\_SUCCESS on success, otherwise one of the following values are returned: TSS\_E\_INVALID\_HANDLE - Either *hContext* or *hObject* are invalid handles. TSS\_E\_INTERNAL\_ERROR - An error occurred internal to the TSS.

## CONFORMING TO

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

## SEE ALSO

[**Tspi\_Context\_CreateObject**(3)](/Tspi_Context_CreateObject/3.md).
