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
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,
55 typedef enum _WCT_OBJECT_STATUS
57 WctStatusNoAccess
= 1,
61 WctStatusPidOnlyRpcss
,
70 typedef struct _WAITCHAIN_NODE_INFO
72 WCT_OBJECT_TYPE ObjectType
;
73 WCT_OBJECT_STATUS ObjectStatus
;
74 __C89_NAMELESS
union {
76 WCHAR ObjectName
[WCT_OBJNAME_LENGTH
];
77 LARGE_INTEGER Timeout
;
84 DWORD ContextSwitches
;
87 } WAITCHAIN_NODE_INFO
, *PWAITCHAIN_NODE_INFO
;
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
);
103 #endif /* __WINE_WCT_H */