File: wct.h

package info (click to toggle)
wine 8.0~repack-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 349,064 kB
  • sloc: ansic: 3,840,948; perl: 22,322; yacc: 18,640; javascript: 13,193; makefile: 11,359; objc: 6,780; lex: 5,004; python: 2,581; cpp: 1,690; xml: 1,332; sh: 868; java: 750; cs: 49
file content (103 lines) | stat: -rw-r--r-- 3,027 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*
 * Copyright 2015 Hans Leidekker for CodeWeavers
 *
 * 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_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 */