dmime: Remove DECLSPEC_HIDDEN usage.
[wine.git] / include / wct.h
blob6c239786916e059c93826cb67afec86f7169f891
1 /*
2 * Copyright 2015 Hans Leidekker for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_WCT_H
20 #define __WINE_WCT_H
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
26 #define WCT_MAX_NODE_COUNT 16
27 #define WCT_OBJNAME_LENGTH 128
29 #define WCT_ASYNC_OPEN_FLAG 0x1
30 #define WCTP_OPEN_ALL_FLAGS (WCT_ASYNC_OPEN_FLAG)
32 #define WCT_OUT_OF_PROC_FLAG 0x1
33 #define WCT_OUT_OF_PROC_COM_FLAG 0x2
34 #define WCT_OUT_OF_PROC_CS_FLAG 0x4
35 #define WCT_NETWORK_IO_FLAG 0x8
36 #define WCTP_GETINFO_ALL_FLAGS (WCT_OUT_OF_PROC_FLAG|WCT_OUT_OF_PROC_COM_FLAG|WCT_OUT_OF_PROC_CS_FLAG)
38 typedef enum _WCT_OBJECT_TYPE
40 WctCriticalSectionType = 1,
41 WctSendMessageType,
42 WctMutexType,
43 WctAlpcType,
44 WctComType,
45 WctThreadWaitType,
46 WctProcessWaitType,
47 WctThreadType,
48 WctComActivationType,
49 WctUnknownType,
50 WctSocketIoType,
51 WctSmbIoType,
52 WctMaxType
53 } WCT_OBJECT_TYPE;
55 typedef enum _WCT_OBJECT_STATUS
57 WctStatusNoAccess = 1,
58 WctStatusRunning,
59 WctStatusBlocked,
60 WctStatusPidOnly,
61 WctStatusPidOnlyRpcss,
62 WctStatusOwned,
63 WctStatusNotOwned,
64 WctStatusAbandoned,
65 WctStatusUnknown,
66 WctStatusError,
67 WctStatusMax
68 } WCT_OBJECT_STATUS;
70 typedef struct _WAITCHAIN_NODE_INFO
72 WCT_OBJECT_TYPE ObjectType;
73 WCT_OBJECT_STATUS ObjectStatus;
74 __C89_NAMELESS union {
75 struct {
76 WCHAR ObjectName[WCT_OBJNAME_LENGTH];
77 LARGE_INTEGER Timeout;
78 BOOL Alertable;
79 } LockObject;
80 struct {
81 DWORD ProcessId;
82 DWORD ThreadId;
83 DWORD WaitTime;
84 DWORD ContextSwitches;
85 } ThreadObject;
87 } WAITCHAIN_NODE_INFO, *PWAITCHAIN_NODE_INFO;
89 typedef LPVOID HWCT;
90 typedef VOID (CALLBACK *PWAITCHAINCALLBACK) (HWCT,DWORD_PTR,DWORD,LPDWORD,PWAITCHAIN_NODE_INFO,LPBOOL);
91 typedef HRESULT (WINAPI *PCOGETCALLSTATE)(int,PULONG);
92 typedef HRESULT (WINAPI *PCOGETACTIVATIONSTATE)(GUID,DWORD,DWORD*);
94 VOID WINAPI CloseThreadWaitChainSession(HWCT);
95 BOOL WINAPI GetThreadWaitChain(HWCT,DWORD_PTR,DWORD,DWORD,LPDWORD,PWAITCHAIN_NODE_INFO,LPBOOL);
96 HWCT WINAPI OpenThreadWaitChainSession(DWORD,PWAITCHAINCALLBACK);
97 void WINAPI RegisterWaitChainCOMCallback(PCOGETCALLSTATE,PCOGETACTIVATIONSTATE);
99 #ifdef __cplusplus
101 #endif
103 #endif /* __WINE_WCT_H */