---
name: "TPMLIB_VolatileAll_Store"
section: "3"
platform: "linux"
package: "libtpms"
version: "0.10.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/TPMLIB_VolatileAll_Store"
---

# TPMLIB\_VolatileAll\_Store(3)

store all volatile state of the TPM in a buffer

## NAME

TPMLIB\_VolatileAll\_Store   - store all volatile state of the TPM in a buffer

## LIBRARY

TPM library (libtpms, -ltpms)

## SYNOPSIS

**#include \<libtpms/tpm\_library.h**\>

**#include \<libtpms/tpm\_error.h**\>

**TPM\_RESULT TPMLIB\_VolatileAll\_Store(unsigned char \*\*buffer,**\
                                    **uint32\_t \*buflen);**

## DESCRIPTION

The **TPMLIB\_VolatileAll\_Store()** function is used to get the volatile  state of the TPM. The function will allocate a *buffer* and return the number of bytes of state information in the *buflen* variable.

## ERRORS

- **TPM\_SUCCESS**

  The function completed successfully.

- **TPM\_FAIL**

  General failure.

For a complete list of TPM error codes please consult the include file **libtpms/tpm\_error.h**

## SEE ALSO

[**TPMLIB\_MainInit**(3)](/TPMLIB_MainInit/3.md), [**TPMLIB\_Terminate**(3)](/TPMLIB_Terminate/3.md), [**TPMLIB\_RegisterCallbacks**(3)](/TPMLIB_RegisterCallbacks/3.md)
