Tbsi_Get_TCG_Logs

Tbsi_Get_TCG_Logs function

Gets one or more Windows Boot Counter Logs (WBCL)TCG log.

Syntax


TBS_RESULT WINAPI Tbsi_Get_TCG_Logs(
            UINT32                           firstLog,
  _Out_opt_ UINT32                           *pNextLog,
            _Out_writes_opt_(cbOutput) PBYTE pbOutput,
            UINT32                           cbOutput,
  _Out_     PUINT32                          pcbResult,
            UINT32                           dwFlags
);

Parameters

firstLog

Specifies the starting log to retrieve. 0 for the most recent full boot, 1 for the first resume from hibernation after the most recent full boot, and so on.

*pNextLog [out, optional]

A pointer to a UINT32 variable to receive the number of the next hibernation log to retrieve.

pbOutput

A pointer to the buffer to retrieve the log data.

cbOutput

The size of the pbOutput buffer.

pcbResult [out]

A pointer to a UINT32 variable to receive the number of bytes written to the buffer, or the size of the buffer required.

dwFlags

Specifies whether or not to retrieve all available logs. 0 to retrieve only the first specified log (firstLog), TBS_GET_ALL_LOGS_FLAG to retrieve all available logs starting with the specified first log.

Return value

If the function succeeds, the function returns TBS_SUCCESS.

If the function fails, it returns a TBS return code that indicates the error.

Return code/valueDescription
TBS_SUCCESS
0 (0x0)

The function was successful.

TBS_E_BAD_PARAMETER
2150121474 (0x80284002)

One or more parameter values are not valid.

TBS_E_TPM_NOT_FOUND
2150121487 (0x8028400F)

A compatible Trusted Platform Module (TPM) Security Device cannot be found on this computer.

 

Remarks

After doing a full boot of a computer with a TPM, then hibernating and resuming the computer several times, call the Tbsi_Get_TCG_Logs functions and pass 0 as the value for the firstLog parameter, NULL for the pbOutput parameter, 0 for the cbOutput parameter, and TBS_GET_ALL_LOGS_FLAG for the dwFlags parameter. The pcbResult output parameter will return the size in bytes of the buffer to allocate to hold all TCG logs since the most recent full boot. Allocate this size buffer, and call Tbsi_Get_TCG_Logs again passing it the buffer pointer for the pbOutput parameter and the buffer size for the cbOutput parameter. Each TCG log will be returned in the buffer separated from the previous log by its length in bytes.

Requirements

Header

Tbs.h

Library

Tbs.lib

DLL

Tbs.dll

See also

Tbsi_Get_TCG_Log
TBS Functions

 

 

Community Additions

ADD
Show:
© 2016 Microsoft