' ########################################################################################
' Microsoft Windows
' File: tbs.inc
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_tbs_PBI)
#DEFINE PBX_tbs_PBI
%TBS_INC = 1
'#if (NTDDI_VERSION >= NTDDI_VISTA)
'typedef BOOL TBS_BOOL;
'typedef UINT32 TBS_RESULT;
'typedef void *TBS_HCONTEXT;
'typedef UINT32 TBS_COMMAND_PRIORITY;
'typedef UINT32 TBS_COMMAND_LOCALITY;
%TBS_CONTEXT_VERSION_ONE = 1
%TBS_COMMAND_PRIORITY_LOW = 100
%TBS_COMMAND_PRIORITY_NORMAL = 200
%TBS_COMMAND_PRIORITY_HIGH = 300
%TBS_COMMAND_PRIORITY_SYSTEM = 400
%TBS_COMMAND_PRIORITY_MAX = &H80000000
%TBS_COMMAND_LOCALITY_ZERO = 0
%TBS_COMMAND_LOCALITY_ONE = 1
%TBS_COMMAND_LOCALITY_TWO = 2
%TBS_COMMAND_LOCALITY_THREE = 3
%TBS_COMMAND_LOCALITY_FOUR = 4
%TBS_SUCCESS = %S_OK
%TBS_IN_OUT_BUF_SIZE_MAX = (256*1024)
' // Size = 4 bytes
TYPE TBS_CONTEXT_PARAMS DWORD
 version AS DWORD ' UINT32
END TYPE
DECLARE FUNCTION Tbsi_Context_Create LIB "tbs.dll" ALIAS "Tbsi_Context_Create" ( BYREF pContextParams AS TBS_CONTEXT_PARAMS , BYREF phContext AS QUAD ) AS QUAD ' TBS_RESULT
DECLARE FUNCTION Tbsip_Context_Close LIB "tbs.dll" ALIAS "Tbsip_Context_Close" ( BYVAL hContext AS QUAD ) AS QUAD ' TBS_RESULT
DECLARE FUNCTION Tbsip_Submit_Command LIB "tbs.dll" ALIAS "Tbsip_Submit_Command" ( BYVAL hContext AS QUAD , BYVAL Locality AS QUAD , BYVAL Priority AS QUAD , BYVAL pCommandBuf AS BYTE PTR , BYVAL CommandBufLen AS QUAD , BYVAL pResultBuf AS BYTE PTR , BYREF pResultBufLen AS QUAD ) AS QUAD ' TBS_RESULT
DECLARE FUNCTION Tbsip_Cancel_Commands LIB "tbs.dll" ALIAS "Tbsip_Cancel_Commands" ( BYVAL hContext AS QUAD ) AS QUAD ' TBS_RESULT
DECLARE FUNCTION Tbsi_Physical_Presence_Command LIB "tbs.dll" ALIAS "Tbsi_Physical_Presence_Command" ( BYVAL hContext AS QUAD , BYVAL pInputBuf AS BYTE PTR , BYVAL InputBufLen AS QUAD , BYVAL pOutputBuf AS BYTE PTR , BYVAL pOutputBufLen AS QUAD ) AS QUAD ' TBS_RESULT
'#if (NTDDI_VERSION >= NTDDI_VISTASP1)
DECLARE FUNCTION Tbsi_Get_TCG_Log LIB "tbs.dll" ALIAS "Tbsi_Get_TCG_Log" ( BYVAL hContext AS QUAD , BYVAL pOutputBuf AS BYTE PTR , BYVAL pOutputBufLen AS QUAD ) AS QUAD ' TBS_RESULT
'#endif // _WIN32_WINNT_VISTASP1
'#endif // _WIN32_WINNT_VISTA