Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51335 Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- configure.ac | 1 + dlls/tbs/Makefile.in | 3 +++ dlls/tbs/tbs.spec | 15 +++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 dlls/tbs/Makefile.in create mode 100644 dlls/tbs/tbs.spec
diff --git a/configure.ac b/configure.ac index 5c4f0c8a6cb..b14c3518a57 100644 --- a/configure.ac +++ b/configure.ac @@ -3664,6 +3664,7 @@ WINE_CONFIG_MAKEFILE(dlls/tapi32) WINE_CONFIG_MAKEFILE(dlls/tapi32/tests) WINE_CONFIG_MAKEFILE(dlls/taskschd) WINE_CONFIG_MAKEFILE(dlls/taskschd/tests) +WINE_CONFIG_MAKEFILE(dlls/tbs) WINE_CONFIG_MAKEFILE(dlls/tdh) WINE_CONFIG_MAKEFILE(dlls/tdi.sys) WINE_CONFIG_MAKEFILE(dlls/toolhelp.dll16,enable_win16) diff --git a/dlls/tbs/Makefile.in b/dlls/tbs/Makefile.in new file mode 100644 index 00000000000..8f23c81e4f9 --- /dev/null +++ b/dlls/tbs/Makefile.in @@ -0,0 +1,3 @@ +MODULE = tbs.dll + +EXTRADLLFLAGS = -mno-cygwin diff --git a/dlls/tbs/tbs.spec b/dlls/tbs/tbs.spec new file mode 100644 index 00000000000..50193d10c70 --- /dev/null +++ b/dlls/tbs/tbs.spec @@ -0,0 +1,15 @@ +@ stub Tbsi_Context_Create +@ stub Tbsi_Create_Attestation_From_Log +@ stub Tbsi_FilterLog +@ stub Tbsi_GetDeviceInfo +@ stub Tbsi_Get_OwnerAuth +@ stub Tbsi_Get_TCG_Log +@ stub Tbsi_Get_TCG_Logs +@ stub Tbsi_Physical_Presence_Command +@ stub Tbsi_Revoke_Attestation +@ stub Tbsi_ShaHash +@ stub Tbsip_Cancel_Commands +@ stub Tbsip_Context_Close +@ stub Tbsip_Submit_Command +@ stub Tbsip_Submit_Command_NonBlocking +@ stub Tbsip_TestMorBit
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- include/tbs.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 include/tbs.h
diff --git a/include/tbs.h b/include/tbs.h new file mode 100644 index 00000000000..c4eee9ad863 --- /dev/null +++ b/include/tbs.h @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2021 Alex Henrie + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_TBS_H +#define __WINE_TBS_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef UINT32 TBS_RESULT; + +typedef struct tdTBS_CONTEXT_PARAMS +{ + UINT32 version; +} TBS_CONTEXT_PARAMS, *PTBS_CONTEXT_PARAMS; + +typedef void *TBS_HCONTEXT, **PTBS_HCONTEXT; + +#ifdef __cplusplus +} +#endif + +#endif
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- include/winerror.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
diff --git a/include/winerror.h b/include/winerror.h index 8765e177029..ff1765212ab 100644 --- a/include/winerror.h +++ b/include/winerror.h @@ -3639,6 +3639,30 @@ static inline HRESULT HRESULT_FROM_WIN32(unsigned int x) #define DWM_E_ADAPTER_NOT_FOUND _HRESULT_TYPEDEF_(0x80263005) #define DWM_S_GDI_REDIRECTION_SURFACE _HRESULT_TYPEDEF_(0x00263005)
+/* Trusted Platform Module Base System error codes */ +#define TBS_E_INTERNAL_ERROR _HRESULT_TYPEDEF_(0x80284001L) +#define TBS_E_BAD_PARAMETER _HRESULT_TYPEDEF_(0x80284002L) +#define TBS_E_INVALID_OUTPUT_POINTER _HRESULT_TYPEDEF_(0x80284003L) +#define TBS_E_INVALID_CONTEXT _HRESULT_TYPEDEF_(0x80284004L) +#define TBS_E_INSUFFICIENT_BUFFER _HRESULT_TYPEDEF_(0x80284005L) +#define TBS_E_IOERROR _HRESULT_TYPEDEF_(0x80284006L) +#define TBS_E_INVALID_CONTEXT_PARAM _HRESULT_TYPEDEF_(0x80284007L) +#define TBS_E_SERVICE_NOT_RUNNING _HRESULT_TYPEDEF_(0x80284008L) +#define TBS_E_TOO_MANY_TBS_CONTEXTS _HRESULT_TYPEDEF_(0x80284009L) +#define TBS_E_TOO_MANY_RESOURCES _HRESULT_TYPEDEF_(0x8028400aL) +#define TBS_E_SERVICE_START_PENDING _HRESULT_TYPEDEF_(0x8028400bL) +#define TBS_E_PPI_NOT_SUPPORTED _HRESULT_TYPEDEF_(0x8028400cL) +#define TBS_E_COMMAND_CANCELED _HRESULT_TYPEDEF_(0x8028400dL) +#define TBS_E_BUFFER_TOO_LARGE _HRESULT_TYPEDEF_(0x8028400eL) +#define TBS_E_TPM_NOT_FOUND _HRESULT_TYPEDEF_(0x8028400fL) +#define TBS_E_SERVICE_DISABLED _HRESULT_TYPEDEF_(0x80284010L) +#define TBS_E_NO_EVENT_LOG _HRESULT_TYPEDEF_(0x80284011L) +#define TBS_E_ACCESS_DENIED _HRESULT_TYPEDEF_(0x80284012L) +#define TBS_E_PROVISIONING_NOT_ALLOWED _HRESULT_TYPEDEF_(0x80284013L) +#define TBS_E_PPI_FUNCTION_UNSUPPORTED _HRESULT_TYPEDEF_(0x80284014L) +#define TBS_E_OWNERAUTH_NOT_FOUND _HRESULT_TYPEDEF_(0x80284015L) +#define TBS_E_PROVISIONING_INCOMPLETE _HRESULT_TYPEDEF_(0x80284016L) + #define UI_E_CREATE_FAILED _HRESULT_TYPEDEF_(0x802a0001) #define UI_E_SHUTDOWN_CALLED _HRESULT_TYPEDEF_(0x802a0002) #define UI_E_ILLEGAL_REENTRANCY _HRESULT_TYPEDEF_(0x802a0003)
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51335 Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/tbs/Makefile.in | 3 +++ dlls/tbs/tbs.c | 31 +++++++++++++++++++++++++++++++ dlls/tbs/tbs.spec | 2 +- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 dlls/tbs/tbs.c
diff --git a/dlls/tbs/Makefile.in b/dlls/tbs/Makefile.in index 8f23c81e4f9..454d66bc6f4 100644 --- a/dlls/tbs/Makefile.in +++ b/dlls/tbs/Makefile.in @@ -1,3 +1,6 @@ MODULE = tbs.dll
EXTRADLLFLAGS = -mno-cygwin + +C_SRCS = \ + tbs.c diff --git a/dlls/tbs/tbs.c b/dlls/tbs/tbs.c new file mode 100644 index 00000000000..5f09f5de125 --- /dev/null +++ b/dlls/tbs/tbs.c @@ -0,0 +1,31 @@ +/* + * Trusted Platform Module Base Services + * + * Copyright 2021 Alex Henrie + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "windef.h" +#include "tbs.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(tbs); + +TBS_RESULT Tbsi_Context_Create(const TBS_CONTEXT_PARAMS *params, TBS_HCONTEXT *out) +{ + FIXME("(%p, %p) stub\n", params, out); + return TBS_E_TPM_NOT_FOUND; +} diff --git a/dlls/tbs/tbs.spec b/dlls/tbs/tbs.spec index 50193d10c70..ee53cf8f89a 100644 --- a/dlls/tbs/tbs.spec +++ b/dlls/tbs/tbs.spec @@ -1,4 +1,4 @@ -@ stub Tbsi_Context_Create +@ stdcall Tbsi_Context_Create(ptr ptr) @ stub Tbsi_Create_Attestation_From_Log @ stub Tbsi_FilterLog @ stub Tbsi_GetDeviceInfo