Tbsip_Submit_Command function (tbs.h)
Submits a Trusted Platform Module (TPM) command to TPM Base Services (TBS) for processing.
Syntax
TBS_RESULT Tbsip_Submit_Command(
[in] TBS_HCONTEXT hContext,
[in] TBS_COMMAND_LOCALITY Locality,
[in] TBS_COMMAND_PRIORITY Priority,
[in] PCBYTE pabCommand,
[in] UINT32 cbCommand,
[out] PBYTE pabResult,
[in, out] PUINT32 pcbResult
);
Parameters
[in] hContext
The handle of the context that is submitting the command.
[in] Locality
Used to set the locality for the TPM command. This must be one of the following values.
[in] Priority
The priority level that the command should have. This parameter can be one of the following values.
[in] pabCommand
A pointer to a buffer that contains the TPM command to process.
[in] cbCommand
The length, in bytes, of the command.
[out] pabResult
A pointer to a buffer to receive the result of the TPM command. This buffer can be the same as pabCommand.
[in, out] pcbResult
An integer that, on input, specifies the size, in bytes, of the result buffer. This value is set when the submit command returns. If the supplied buffer is too small, this parameter, on output, is set to the required size, in bytes, for the result.
Return value
If the function succeeds, the function returns TBS_SUCCESS.
A command can be submitted successfully and still fail at the TPM. In this case, the failure code is returned as a standard TPM error in the result buffer.
If the function fails, it returns a TBS return code that indicates the error.
Return code/value | Description |
---|---|
|
The function was successful. |
|
One or more parameter values are not valid. |
|
The input or output buffer is too large. |
|
An internal software error occurred. |
|
The specified output buffer is too small. |
|
The specified context handle does not refer to a valid context. |
|
A specified output pointer is not valid. |
|
An error occurred while communicating with the TPM. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | tbs.h |
Library | Tbs.lib |
DLL | Tbs.dll |