---
name: "Tspi_TPM_GetEvents"
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_TPM_GetEvents"
---

# Tspi\_TPM\_GetEvents(3)

## NAME

Tspi\_TPM\_GetEvents- get a specific number of PCR events for a given index.

## 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\_TPM\_GetEvents(TSS\_HTPM**       *hTPM***,            UINT32**  *ulPcrIndex***,**                                **UINT32**         *ulStartNumber***,   UINT32\*** *pulEventNumber***,**                                **TSS\_PCR\_EVENT\*** *prgbPcrEvents***);**

## DESCRIPTION

**Tspi\_TPM\_GetEvents** provides a specific number of PCR events for a given index.

## PARAMETERS

### hTPM

Handle of the TPM object.

### ulPcrIndex

Index of the PCR to request.

### ulStartNumber

Indext of the first event to request

### pulEventNumber

\[IN\] Number of elements to request. \[OUT\] Receives number of returned event data structures in prgbPcrEvents parameter.

### prgbPcrEvents

Receives a pointer to an array of PCR event data. If NULL, only the number of elements is returned in pulEventNumber parameter.

## RETURN CODES

**Tspi\_TPM\_GetEvents** returns TSS\_SUCCESS on success, otherwise one of the following values are returned: TSS\_E\_INVALID\_HANDLE **hTPM** is not a valid handle to the TPM object. TSS\_E\_INTERNAL\_ERROR An error occurred internal to the TSS.

## CONFORMING TO

**Tspi\_TPM\_GetEvents** conforms to the Trusted Computing Group Software Specification version 1.1 Golden

## SEE ALSO

[**Tspi\_TPM\_GetEvent**(3)](/Tspi_TPM_GetEvent/3.md) [**Tspi\_TPM\_GetEventLog**(3)](/Tspi_TPM_GetEventLog/3.md).
