Signed-off-by: Gijs Vermeulen gijsvrm@gmail.com --- This series allows Cubase 12 to proceed to the next problem.
include/wct.h | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+)
diff --git a/include/wct.h b/include/wct.h index 0cef59d7174e..6c239786916e 100644 --- a/include/wct.h +++ b/include/wct.h @@ -19,9 +19,85 @@ #ifndef __WINE_WCT_H #define __WINE_WCT_H
+#ifdef __cplusplus +extern "C" { +#endif + +#define WCT_MAX_NODE_COUNT 16 +#define WCT_OBJNAME_LENGTH 128 + +#define WCT_ASYNC_OPEN_FLAG 0x1 +#define WCTP_OPEN_ALL_FLAGS (WCT_ASYNC_OPEN_FLAG) + +#define WCT_OUT_OF_PROC_FLAG 0x1 +#define WCT_OUT_OF_PROC_COM_FLAG 0x2 +#define WCT_OUT_OF_PROC_CS_FLAG 0x4 +#define WCT_NETWORK_IO_FLAG 0x8 +#define WCTP_GETINFO_ALL_FLAGS (WCT_OUT_OF_PROC_FLAG|WCT_OUT_OF_PROC_COM_FLAG|WCT_OUT_OF_PROC_CS_FLAG) + +typedef enum _WCT_OBJECT_TYPE +{ + WctCriticalSectionType = 1, + WctSendMessageType, + WctMutexType, + WctAlpcType, + WctComType, + WctThreadWaitType, + WctProcessWaitType, + WctThreadType, + WctComActivationType, + WctUnknownType, + WctSocketIoType, + WctSmbIoType, + WctMaxType +} WCT_OBJECT_TYPE; + +typedef enum _WCT_OBJECT_STATUS +{ + WctStatusNoAccess = 1, + WctStatusRunning, + WctStatusBlocked, + WctStatusPidOnly, + WctStatusPidOnlyRpcss, + WctStatusOwned, + WctStatusNotOwned, + WctStatusAbandoned, + WctStatusUnknown, + WctStatusError, + WctStatusMax +} WCT_OBJECT_STATUS; + +typedef struct _WAITCHAIN_NODE_INFO +{ + WCT_OBJECT_TYPE ObjectType; + WCT_OBJECT_STATUS ObjectStatus; + __C89_NAMELESS union { + struct { + WCHAR ObjectName[WCT_OBJNAME_LENGTH]; + LARGE_INTEGER Timeout; + BOOL Alertable; + } LockObject; + struct { + DWORD ProcessId; + DWORD ThreadId; + DWORD WaitTime; + DWORD ContextSwitches; + } ThreadObject; + }; +} WAITCHAIN_NODE_INFO, *PWAITCHAIN_NODE_INFO; + +typedef LPVOID HWCT; +typedef VOID (CALLBACK *PWAITCHAINCALLBACK) (HWCT,DWORD_PTR,DWORD,LPDWORD,PWAITCHAIN_NODE_INFO,LPBOOL); typedef HRESULT (WINAPI *PCOGETCALLSTATE)(int,PULONG); typedef HRESULT (WINAPI *PCOGETACTIVATIONSTATE)(GUID,DWORD,DWORD*);
+VOID WINAPI CloseThreadWaitChainSession(HWCT); +BOOL WINAPI GetThreadWaitChain(HWCT,DWORD_PTR,DWORD,DWORD,LPDWORD,PWAITCHAIN_NODE_INFO,LPBOOL); +HWCT WINAPI OpenThreadWaitChainSession(DWORD,PWAITCHAINCALLBACK); void WINAPI RegisterWaitChainCOMCallback(PCOGETCALLSTATE,PCOGETACTIVATIONSTATE);
+#ifdef __cplusplus +} +#endif + #endif /* __WINE_WCT_H */
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52655 Signed-off-by: Gijs Vermeulen gijsvrm@gmail.com --- dlls/advapi32/advapi.c | 7 +++++++ dlls/advapi32/advapi32.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/advapi32/advapi.c b/dlls/advapi32/advapi.c index ce91cf9276a0..0145b2d843dc 100644 --- a/dlls/advapi32/advapi.c +++ b/dlls/advapi32/advapi.c @@ -297,3 +297,10 @@ void WINAPI RegisterWaitChainCOMCallback(PCOGETCALLSTATE call_state_cb, { FIXME("%p, %p\n", call_state_cb, activation_state_cb); } + +HWCT WINAPI OpenThreadWaitChainSession(DWORD flags, PWAITCHAINCALLBACK callback) +{ + FIXME("flags %ld, callback %p stub!\n", flags, callback); + SetLastError(ERROR_NOT_SUPPORTED); + return NULL; +} diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index cefc8dc28996..f17e1f2645e0 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -548,7 +548,7 @@ @ stdcall -import OpenServiceA(long str long) @ stdcall -import OpenServiceW(long wstr long) @ stdcall -import OpenThreadToken(long long long ptr) -# @ stub OpenThreadWaitChainSession +@ stdcall OpenThreadWaitChainSession(long ptr) @ stdcall -ret64 OpenTraceA(ptr) @ stdcall -ret64 -import OpenTraceW(ptr) # @ stub OperationEnd
Signed-off-by: Gijs Vermeulen gijsvrm@gmail.com --- dlls/advapi32/advapi.c | 8 ++++++++ dlls/advapi32/advapi32.spec | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/advapi32/advapi.c b/dlls/advapi32/advapi.c index 0145b2d843dc..f3ad93e42c57 100644 --- a/dlls/advapi32/advapi.c +++ b/dlls/advapi32/advapi.c @@ -304,3 +304,11 @@ HWCT WINAPI OpenThreadWaitChainSession(DWORD flags, PWAITCHAINCALLBACK callback) SetLastError(ERROR_NOT_SUPPORTED); return NULL; } + +BOOL WINAPI GetThreadWaitChain(HWCT handle, DWORD_PTR ctx, DWORD flags, DWORD thread_id, DWORD *node_count, + WAITCHAIN_NODE_INFO *node_info_arr, BOOL *is_cycle) +{ + FIXME("handle %p, ctx %p, flags %ld, thread_id %ld, node_count %p, node_info_arr %p, is_cycle %p stub!\n"); + SetLastError(ERROR_NOT_SUPPORTED); + return FALSE; +} diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index f17e1f2645e0..3b5f587d40e9 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -370,7 +370,7 @@ @ stdcall -import GetSidSubAuthorityCount(ptr) @ stub GetSiteSidFromToken # @ stub GetStringConditionFromBinary -# @ stub GetThreadWaitChain +@ stdcall GetThreadWaitChain(ptr ptr long long ptr ptr ptr) @ stdcall -import GetTokenInformation(long long ptr long ptr) @ stdcall GetTraceEnableFlags(int64) ntdll.EtwGetTraceEnableFlags @ stdcall GetTraceEnableLevel(int64) ntdll.EtwGetTraceEnableLevel