4 #pragma GCC system_header
11 #define EXPENTRY CALLBACK
12 #define CP_WINANSI 1004
13 #define CP_WINUNICODE 1200
14 #define XTYPF_NOBLOCK 2
15 #define XTYPF_NODATA 4
16 #define XTYPF_ACKREQ 8
17 #define XCLASS_MASK 0xFC00
18 #define XCLASS_BOOL 0x1000
19 #define XCLASS_DATA 0x2000
20 #define XCLASS_FLAGS 0x4000
21 #define XCLASS_NOTIFICATION 0x8000
23 #define XST_INCOMPLETE 1
24 #define XST_CONNECTED 2
28 #define XST_DATARCVD 6
29 #define XST_POKESENT 7
30 #define XST_POKEACKRCVD 8
31 #define XST_EXECSENT 9
32 #define XST_EXECACKRCVD 10
33 #define XST_ADVSENT 11
34 #define XST_UNADVSENT 12
35 #define XST_ADVACKRCVD 13
36 #define XST_UNADVACKRCVD 14
37 #define XST_ADVDATASENT 15
38 #define XST_ADVDATAACKRCVD 16
39 #define XTYP_ERROR (XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
40 #define XTYP_ADVDATA (16|XCLASS_FLAGS)
41 #define XTYP_ADVREQ (32|XCLASS_DATA|XTYPF_NOBLOCK)
42 #define XTYP_ADVSTART (0x30|XCLASS_BOOL)
43 #define XTYP_ADVSTOP (0x0040|XCLASS_NOTIFICATION)
44 #define XTYP_EXECUTE (0x0050|XCLASS_FLAGS)
45 #define XTYP_CONNECT (0x0060|XCLASS_BOOL|XTYPF_NOBLOCK)
46 #define XTYP_CONNECT_CONFIRM (0x0070|XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
47 #define XTYP_XACT_COMPLETE (0x0080|XCLASS_NOTIFICATION)
48 #define XTYP_POKE (0x0090|XCLASS_FLAGS)
49 #define XTYP_REGISTER (0x00A0|XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
50 #define XTYP_REQUEST (0x00B0|XCLASS_DATA)
51 #define XTYP_DISCONNECT (0x00C0|XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
52 #define XTYP_UNREGISTER (0x00D0|XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
53 #define XTYP_WILDCONNECT (0x00E0|XCLASS_DATA|XTYPF_NOBLOCK)
54 #define XTYP_MASK 0xF0
56 #define TIMEOUT_ASYNC 0xFFFFFFFF
57 #define QID_SYNC 0xFFFFFFFF
58 #define ST_CONNECTED 1
63 #define ST_TERMINATED 32
65 #define ST_BLOCKNEXT 128
67 #define CADV_LATEACK 0xFFFF
68 #define DMLERR_NO_ERROR 0
69 #define DMLERR_FIRST 0x4000
70 #define DMLERR_ADVACKTIMEOUT 0x4000
71 #define DMLERR_BUSY 0x4001
72 #define DMLERR_DATAACKTIMEOUT 0x4002
73 #define DMLERR_DLL_NOT_INITIALIZED 0x4003
74 #define DMLERR_DLL_USAGE 0x4004
75 #define DMLERR_EXECACKTIMEOUT 0x4005
76 #define DMLERR_INVALIDPARAMETER 0x4006
77 #define DMLERR_LOW_MEMORY 0x4007
78 #define DMLERR_MEMORY_ERROR 0x4008
79 #define DMLERR_NOTPROCESSED 0x4009
80 #define DMLERR_NO_CONV_ESTABLISHED 0x400a
81 #define DMLERR_POKEACKTIMEOUT 0x400b
82 #define DMLERR_POSTMSG_FAILED 0x400c
83 #define DMLERR_REENTRANCY 0x400d
84 #define DMLERR_SERVER_DIED 0x400e
85 #define DMLERR_SYS_ERROR 0x400f
86 #define DMLERR_UNADVACKTIMEOUT 0x4010
87 #define DMLERR_UNFOUND_QUEUE_ID 0x4011
88 #define DMLERR_LAST 0x4011
89 #define DDE_FACK 0x8000
90 #define DDE_FBUSY 0x4000
91 #define DDE_FDEFERUPD 0x4000
92 #define DDE_FACKREQ 0x8000
93 #define DDE_FRELEASE 0x2000
94 #define DDE_FREQUESTED 0x1000
95 #define DDE_FAPPSTATUS 0x00ff
96 #define DDE_FNOTPROCESSED 0
97 #define DDE_FACKRESERVED (~(DDE_FACK|DDE_FBUSY|DDE_FAPPSTATUS))
98 #define DDE_FADVRESERVED (~(DDE_FACKREQ|DDE_FDEFERUPD))
99 #define DDE_FDATRESERVED (~(DDE_FACKREQ|DDE_FRELEASE|DDE_FREQUESTED))
100 #define DDE_FPOKRESERVED (~DDE_FRELEASE)
101 #define MSGF_DDEMGR 0x8001
102 #define CBR_BLOCK ((HDDEDATA)0xffffffff)
103 #define CBF_FAIL_SELFCONNECTIONS 0x1000
104 #define CBF_FAIL_CONNECTIONS 0x2000
105 #define CBF_FAIL_ADVISES 0x4000
106 #define CBF_FAIL_EXECUTES 0x8000
107 #define CBF_FAIL_POKES 0x10000
108 #define CBF_FAIL_REQUESTS 0x20000
109 #define CBF_FAIL_ALLSVRXACTIONS 0x3f000
110 #define CBF_SKIP_CONNECT_CONFIRMS 0x40000
111 #define CBF_SKIP_REGISTRATIONS 0x80000
112 #define CBF_SKIP_UNREGISTRATIONS 0x100000
113 #define CBF_SKIP_DISCONNECTS 0x200000
114 #define CBF_SKIP_ALLNOTIFICATIONS 0x3c0000
115 #define APPCMD_CLIENTONLY 0x10L
116 #define APPCMD_FILTERINITS 0x20L
117 #define APPCMD_MASK 0xFF0L
118 #define APPCLASS_STANDARD 0
119 #define APPCLASS_MASK 0xFL
120 #define EC_ENABLEALL 0
121 #define EC_ENABLEONE ST_BLOCKNEXT
122 #define EC_DISABLE ST_BLOCKED
123 #define EC_QUERYWAITING 2
124 #define DNS_REGISTER 1
125 #define DNS_UNREGISTER 2
126 #define DNS_FILTERON 4
127 #define DNS_FILTEROFF 8
128 #define HDATA_APPOWNED 1
129 #define MAX_MONITORS 4
130 #define APPCLASS_MONITOR 1L
131 #define XTYP_MONITOR (XCLASS_NOTIFICATION|XTYPF_NOBLOCK|0xF0)
132 #define MF_HSZ_INFO 0x1000000
133 #define MF_SENDMSGS 0x2000000
134 #define MF_POSTMSGS 0x4000000
135 #define MF_CALLBACKS 0x8000000
136 #define MF_ERRORS 0x10000000
137 #define MF_LINKS 0x20000000
138 #define MF_CONV 0x40000000
139 #define MF_MASK 0xFF000000
145 DECLARE_HANDLE(HCONVLIST
);
146 DECLARE_HANDLE(HCONV
);
148 DECLARE_HANDLE(HDDEDATA
);
149 typedef HDDEDATA CALLBACK
FNCALLBACK(UINT
,UINT
,HCONV
,HSZ
,HSZ
,HDDEDATA
,DWORD
,DWORD
);
150 typedef HDDEDATA(CALLBACK
*PFNCALLBACK
)(UINT
,UINT
,HCONV
,HSZ
,HSZ
,HDDEDATA
,DWORD
,DWORD
);
151 typedef struct tagHSZPAIR
{
154 } HSZPAIR
, *PHSZPAIR
;
155 typedef struct tagCONVCONTEXT
{
162 SECURITY_QUALITY_OF_SERVICE qos
;
163 } CONVCONTEXT
,*PCONVCONTEXT
;
164 typedef struct tagCONVINFO
{
178 CONVCONTEXT ConvCtxt
;
181 } CONVINFO
,*PCONVINFO
;
182 typedef struct tagDDEML_MSG_HOOK_DATA
{
187 } DDEML_MSG_HOOK_DATA
;
188 typedef struct tagMONHSZSTRUCT
{
195 } MONHSZSTRUCT
, *PMONHSZSTRUCT
;
196 typedef struct tagMONLINKSTRUCT
{
209 } MONLINKSTRUCT
, *PMONLINKSTRUCT
;
210 typedef struct tagMONCONVSTRUCT
{
219 } MONCONVSTRUCT
, *PMONCONVSTRUCT
;
220 typedef struct tagMONCBSTRUCT
{
236 } MONCBSTRUCT
, *PMONCBSTRUCT
;
237 typedef struct tagMONERRSTRUCT
{
242 } MONERRSTRUCT
, *PMONERRSTRUCT
;
243 typedef struct tagMONMSGSTRUCT
{
251 DDEML_MSG_HOOK_DATA dmhd
;
252 } MONMSGSTRUCT
, *PMONMSGSTRUCT
;
254 BOOL WINAPI
DdeAbandonTransaction(DWORD
,HCONV
,DWORD
);
255 PBYTE WINAPI
DdeAccessData(HDDEDATA
,PDWORD
);
256 HDDEDATA WINAPI
DdeAddData(HDDEDATA
,PBYTE
,DWORD
,DWORD
);
257 HDDEDATA WINAPI
DdeClientTransaction(PBYTE
,DWORD
,HCONV
,HSZ
,UINT
,UINT
,DWORD
,PDWORD
);
258 int WINAPI
DdeCmpStringHandles(HSZ
,HSZ
);
259 HCONV WINAPI
DdeConnect(DWORD
,HSZ
,HSZ
,PCONVCONTEXT
);
260 HCONVLIST WINAPI
DdeConnectList(DWORD
,HSZ
,HSZ
,HCONVLIST
,PCONVCONTEXT
);
261 HDDEDATA WINAPI
DdeCreateDataHandle(DWORD
,PBYTE
,DWORD
,DWORD
,HSZ
,UINT
,UINT
);
262 HSZ WINAPI
DdeCreateStringHandleA(DWORD
,LPCSTR
,int);
263 HSZ WINAPI
DdeCreateStringHandleW(DWORD
,LPCWSTR
,int);
264 BOOL WINAPI
DdeDisconnect(HCONV
);
265 BOOL WINAPI
DdeDisconnectList(HCONVLIST
);
266 BOOL WINAPI
DdeEnableCallback(DWORD
,HCONV
,UINT
);
267 BOOL WINAPI
DdeFreeDataHandle(HDDEDATA
);
268 BOOL WINAPI
DdeFreeStringHandle(DWORD
,HSZ
);
269 DWORD WINAPI
DdeGetData(HDDEDATA
,PBYTE
,DWORD
,DWORD
);
270 UINT WINAPI
DdeGetLastError(DWORD
);
271 BOOL WINAPI
DdeImpersonateClient(HCONV
);
272 UINT WINAPI
DdeInitializeA(PDWORD
,PFNCALLBACK
,DWORD
,DWORD
);
273 UINT WINAPI
DdeInitializeW(PDWORD
,PFNCALLBACK
,DWORD
,DWORD
);
274 BOOL WINAPI
DdeKeepStringHandle(DWORD
,HSZ
);
275 HDDEDATA WINAPI
DdeNameService(DWORD
,HSZ
,HSZ
,UINT
);
276 BOOL WINAPI
DdePostAdvise(DWORD
,HSZ
,HSZ
);
277 UINT WINAPI
DdeQueryConvInfo(HCONV
,DWORD
,PCONVINFO
);
278 HCONV WINAPI
DdeQueryNextServer(HCONVLIST
,HCONV
);
279 DWORD WINAPI
DdeQueryStringA(DWORD
,HSZ
,LPSTR
,DWORD
,int);
280 DWORD WINAPI
DdeQueryStringW(DWORD
,HSZ
,LPWSTR
,DWORD
,int);
281 HCONV WINAPI
DdeReconnect(HCONV
);
282 BOOL WINAPI
DdeSetUserHandle(HCONV
,DWORD
,DWORD
);
283 BOOL WINAPI
DdeUnaccessData(HDDEDATA
);
284 BOOL WINAPI
DdeUninitialize(DWORD
);
287 #define SZDDESYS_TOPIC L"System"
288 #define SZDDESYS_ITEM_TOPICS L"Topics"
289 #define SZDDESYS_ITEM_SYSITEMS L"SysItems"
290 #define SZDDESYS_ITEM_RTNMSG L"ReturnMessage"
291 #define SZDDESYS_ITEM_STATUS L"Status"
292 #define SZDDESYS_ITEM_FORMATS L"Formats"
293 #define SZDDESYS_ITEM_HELP L"Help"
294 #define SZDDE_ITEM_ITEMLIST L"TopicItemList"
295 #define DdeCreateStringHandle DdeCreateStringHandleW
296 #define DdeInitialize DdeInitializeW
297 #define DdeQueryString DdeQueryStringW
299 #define SZDDESYS_TOPIC "System"
300 #define SZDDESYS_ITEM_TOPICS "Topics"
301 #define SZDDESYS_ITEM_SYSITEMS "SysItems"
302 #define SZDDESYS_ITEM_RTNMSG "ReturnMessage"
303 #define SZDDESYS_ITEM_STATUS "Status"
304 #define SZDDESYS_ITEM_FORMATS "Formats"
305 #define SZDDESYS_ITEM_HELP "Help"
306 #define SZDDE_ITEM_ITEMLIST "TopicItemList"
307 #define DdeCreateStringHandle DdeCreateStringHandleA
308 #define DdeInitialize DdeInitializeA
309 #define DdeQueryString DdeQueryStringA
314 #endif /* _DDEML_H */