Updated bash.exe to MSYS-gca78a7c
[msysgit.git] / include / ddeml.h
blob3f44c76f345cc0ec7fbf32eb70c3448502152516
1 #ifndef _DDEML_H
2 #define _DDEML_H
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
7 #define EXPENTRY CALLBACK
8 #define CP_WINANSI 1004
9 #define CP_WINUNICODE 1200
10 #define XTYPF_NOBLOCK 2
11 #define XTYPF_NODATA 4
12 #define XTYPF_ACKREQ 8
13 #define XCLASS_MASK 0xFC00
14 #define XCLASS_BOOL 0x1000
15 #define XCLASS_DATA 0x2000
16 #define XCLASS_FLAGS 0x4000
17 #define XCLASS_NOTIFICATION 0x8000
18 #define XST_NULL 0
19 #define XST_INCOMPLETE 1
20 #define XST_CONNECTED 2
21 #define XST_INIT1 3
22 #define XST_INIT2 4
23 #define XST_REQSENT 5
24 #define XST_DATARCVD 6
25 #define XST_POKESENT 7
26 #define XST_POKEACKRCVD 8
27 #define XST_EXECSENT 9
28 #define XST_EXECACKRCVD 10
29 #define XST_ADVSENT 11
30 #define XST_UNADVSENT 12
31 #define XST_ADVACKRCVD 13
32 #define XST_UNADVACKRCVD 14
33 #define XST_ADVDATASENT 15
34 #define XST_ADVDATAACKRCVD 16
35 #define XTYP_ERROR (XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
36 #define XTYP_ADVDATA (16|XCLASS_FLAGS)
37 #define XTYP_ADVREQ (32|XCLASS_DATA|XTYPF_NOBLOCK)
38 #define XTYP_ADVSTART (0x30|XCLASS_BOOL)
39 #define XTYP_ADVSTOP (0x0040|XCLASS_NOTIFICATION)
40 #define XTYP_EXECUTE (0x0050|XCLASS_FLAGS)
41 #define XTYP_CONNECT (0x0060|XCLASS_BOOL|XTYPF_NOBLOCK)
42 #define XTYP_CONNECT_CONFIRM (0x0070|XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
43 #define XTYP_XACT_COMPLETE (0x0080|XCLASS_NOTIFICATION)
44 #define XTYP_POKE (0x0090|XCLASS_FLAGS)
45 #define XTYP_REGISTER (0x00A0|XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
46 #define XTYP_REQUEST (0x00B0|XCLASS_DATA)
47 #define XTYP_DISCONNECT (0x00C0|XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
48 #define XTYP_UNREGISTER (0x00D0|XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
49 #define XTYP_WILDCONNECT (0x00E0|XCLASS_DATA|XTYPF_NOBLOCK)
50 #define XTYP_MASK 0xF0
51 #define XTYP_SHIFT 4
52 #define TIMEOUT_ASYNC 0xFFFFFFFF
53 #define QID_SYNC 0xFFFFFFFF
54 #define ST_CONNECTED 1
55 #define ST_ADVISE 2
56 #define ST_ISLOCAL 4
57 #define ST_BLOCKED 8
58 #define ST_CLIENT 16
59 #define ST_TERMINATED 32
60 #define ST_INLIST 64
61 #define ST_BLOCKNEXT 128
62 #define ST_ISSELF 256
63 #define CADV_LATEACK 0xFFFF
64 #define DMLERR_NO_ERROR 0
65 #define DMLERR_FIRST 0x4000
66 #define DMLERR_ADVACKTIMEOUT 0x4000
67 #define DMLERR_BUSY 0x4001
68 #define DMLERR_DATAACKTIMEOUT 0x4002
69 #define DMLERR_DLL_NOT_INITIALIZED 0x4003
70 #define DMLERR_DLL_USAGE 0x4004
71 #define DMLERR_EXECACKTIMEOUT 0x4005
72 #define DMLERR_INVALIDPARAMETER 0x4006
73 #define DMLERR_LOW_MEMORY 0x4007
74 #define DMLERR_MEMORY_ERROR 0x4008
75 #define DMLERR_NOTPROCESSED 0x4009
76 #define DMLERR_NO_CONV_ESTABLISHED 0x400a
77 #define DMLERR_POKEACKTIMEOUT 0x400b
78 #define DMLERR_POSTMSG_FAILED 0x400c
79 #define DMLERR_REENTRANCY 0x400d
80 #define DMLERR_SERVER_DIED 0x400e
81 #define DMLERR_SYS_ERROR 0x400f
82 #define DMLERR_UNADVACKTIMEOUT 0x4010
83 #define DMLERR_UNFOUND_QUEUE_ID 0x4011
84 #define DMLERR_LAST 0x4011
85 #define DDE_FACK 0x8000
86 #define DDE_FBUSY 0x4000
87 #define DDE_FDEFERUPD 0x4000
88 #define DDE_FACKREQ 0x8000
89 #define DDE_FRELEASE 0x2000
90 #define DDE_FREQUESTED 0x1000
91 #define DDE_FAPPSTATUS 0x00ff
92 #define DDE_FNOTPROCESSED 0
93 #define DDE_FACKRESERVED (~(DDE_FACK|DDE_FBUSY|DDE_FAPPSTATUS))
94 #define DDE_FADVRESERVED (~(DDE_FACKREQ|DDE_FDEFERUPD))
95 #define DDE_FDATRESERVED (~(DDE_FACKREQ|DDE_FRELEASE|DDE_FREQUESTED))
96 #define DDE_FPOKRESERVED (~DDE_FRELEASE)
97 #define MSGF_DDEMGR 0x8001
98 #define CBR_BLOCK ((HDDEDATA)0xffffffff)
99 #define CBF_FAIL_SELFCONNECTIONS 0x1000
100 #define CBF_FAIL_CONNECTIONS 0x2000
101 #define CBF_FAIL_ADVISES 0x4000
102 #define CBF_FAIL_EXECUTES 0x8000
103 #define CBF_FAIL_POKES 0x10000
104 #define CBF_FAIL_REQUESTS 0x20000
105 #define CBF_FAIL_ALLSVRXACTIONS 0x3f000
106 #define CBF_SKIP_CONNECT_CONFIRMS 0x40000
107 #define CBF_SKIP_REGISTRATIONS 0x80000
108 #define CBF_SKIP_UNREGISTRATIONS 0x100000
109 #define CBF_SKIP_DISCONNECTS 0x200000
110 #define CBF_SKIP_ALLNOTIFICATIONS 0x3c0000
111 #define APPCMD_CLIENTONLY 0x10L
112 #define APPCMD_FILTERINITS 0x20L
113 #define APPCMD_MASK 0xFF0L
114 #define APPCLASS_STANDARD 0
115 #define APPCLASS_MASK 0xFL
116 #define EC_ENABLEALL 0
117 #define EC_ENABLEONE ST_BLOCKNEXT
118 #define EC_DISABLE ST_BLOCKED
119 #define EC_QUERYWAITING 2
120 #define DNS_REGISTER 1
121 #define DNS_UNREGISTER 2
122 #define DNS_FILTERON 4
123 #define DNS_FILTEROFF 8
124 #define HDATA_APPOWNED 1
125 #define MAX_MONITORS 4
126 #define APPCLASS_MONITOR 1L
127 #define XTYP_MONITOR (XCLASS_NOTIFICATION|XTYPF_NOBLOCK|0xF0)
128 #define MF_HSZ_INFO 0x1000000
129 #define MF_SENDMSGS 0x2000000
130 #define MF_POSTMSGS 0x4000000
131 #define MF_CALLBACKS 0x8000000
132 #define MF_ERRORS 0x10000000
133 #define MF_LINKS 0x20000000
134 #define MF_CONV 0x40000000
135 #define MF_MASK 0xFF000000
137 DECLARE_HANDLE(HCONVLIST);
138 DECLARE_HANDLE(HCONV);
139 DECLARE_HANDLE(HSZ);
140 DECLARE_HANDLE(HDDEDATA);
141 typedef HDDEDATA CALLBACK FNCALLBACK(UINT,UINT,HCONV,HSZ,HSZ,HDDEDATA,DWORD,DWORD);
142 typedef HDDEDATA(CALLBACK *PFNCALLBACK)(UINT,UINT,HCONV,HSZ,HSZ,HDDEDATA,DWORD,DWORD);
143 typedef struct tagHSZPAIR {
144 HSZ hszSvc;
145 HSZ hszTopic;
146 } HSZPAIR, *PHSZPAIR;
147 typedef struct tagCONVCONTEXT {
148 UINT cb;
149 UINT wFlags;
150 UINT wCountryID;
151 int iCodePage;
152 DWORD dwLangID;
153 DWORD dwSecurity;
154 SECURITY_QUALITY_OF_SERVICE qos;
155 } CONVCONTEXT,*PCONVCONTEXT;
156 typedef struct tagCONVINFO {
157 DWORD cb;
158 DWORD hUser;
159 HCONV hConvPartner;
160 HSZ hszSvcPartner;
161 HSZ hszServiceReq;
162 HSZ hszTopic;
163 HSZ hszItem;
164 UINT wFmt;
165 UINT wType;
166 UINT wStatus;
167 UINT wConvst;
168 UINT wLastError;
169 HCONVLIST hConvList;
170 CONVCONTEXT ConvCtxt;
171 HWND hwnd;
172 HWND hwndPartner;
173 } CONVINFO,*PCONVINFO;
174 typedef struct tagDDEML_MSG_HOOK_DATA {
175 UINT uiLo;
176 UINT uiHi;
177 DWORD cbData;
178 DWORD Data[8];
179 } DDEML_MSG_HOOK_DATA;
181 BOOL WINAPI DdeAbandonTransaction(DWORD,HCONV,DWORD);
182 PBYTE WINAPI DdeAccessData(HDDEDATA,PDWORD);
183 HDDEDATA WINAPI DdeAddData(HDDEDATA,PBYTE,DWORD,DWORD);
184 HDDEDATA WINAPI DdeClientTransaction(PBYTE,DWORD,HCONV,HSZ,UINT,UINT,DWORD,PDWORD);
185 int WINAPI DdeCmpStringHandles(HSZ,HSZ);
186 HCONV WINAPI DdeConnect(DWORD,HSZ,HSZ,PCONVCONTEXT);
187 HCONVLIST WINAPI DdeConnectList(DWORD,HSZ,HSZ,HCONVLIST,PCONVCONTEXT);
188 HDDEDATA WINAPI DdeCreateDataHandle(DWORD,PBYTE,DWORD,DWORD,HSZ,UINT,UINT);
189 HSZ WINAPI DdeCreateStringHandleA(DWORD,LPCSTR,int);
190 HSZ WINAPI DdeCreateStringHandleW(DWORD,LPCWSTR,int);
191 BOOL WINAPI DdeDisconnect(HCONV);
192 BOOL WINAPI DdeDisconnectList(HCONVLIST);
193 BOOL WINAPI DdeEnableCallback(DWORD,HCONV,UINT);
194 BOOL WINAPI DdeFreeDataHandle(HDDEDATA);
195 BOOL WINAPI DdeFreeStringHandle(DWORD,HSZ);
196 DWORD WINAPI DdeGetData(HDDEDATA,PBYTE,DWORD,DWORD);
197 UINT WINAPI DdeGetLastError(DWORD);
198 BOOL WINAPI DdeImpersonateClient(HCONV);
199 UINT WINAPI DdeInitializeA(PDWORD,PFNCALLBACK,DWORD,DWORD);
200 UINT WINAPI DdeInitializeW(PDWORD,PFNCALLBACK,DWORD,DWORD);
201 BOOL WINAPI DdeKeepStringHandle(DWORD,HSZ);
202 HDDEDATA WINAPI DdeNameService(DWORD,HSZ,HSZ,UINT);
203 BOOL WINAPI DdePostAdvise(DWORD,HSZ,HSZ);
204 UINT WINAPI DdeQueryConvInfo(HCONV,DWORD,PCONVINFO);
205 HCONV WINAPI DdeQueryNextServer(HCONVLIST,HCONV);
206 DWORD WINAPI DdeQueryStringA(DWORD,HSZ,LPSTR,DWORD,int);
207 DWORD WINAPI DdeQueryStringW(DWORD,HSZ,LPWSTR,DWORD,int);
208 HCONV WINAPI DdeReconnect(HCONV);
209 BOOL WINAPI DdeSetUserHandle(HCONV,DWORD,DWORD);
210 BOOL WINAPI DdeUnaccessData(HDDEDATA);
211 BOOL WINAPI DdeUninitialize(DWORD);
213 #ifdef UNICODE
214 #define SZDDESYS_TOPIC L"System"
215 #define SZDDESYS_ITEM_TOPICS L"Topics"
216 #define SZDDESYS_ITEM_SYSITEMS L"SysItems"
217 #define SZDDESYS_ITEM_RTNMSG L"ReturnMessage"
218 #define SZDDESYS_ITEM_STATUS L"Status"
219 #define SZDDESYS_ITEM_FORMATS L"Formats"
220 #define SZDDESYS_ITEM_HELP L"Help"
221 #define SZDDE_ITEM_ITEMLIST L"TopicItemList"
222 #define DdeCreateStringHandle DdeCreateStringHandleW
223 #define DdeInitialize DdeInitializeW
224 #define DdeQueryString DdeQueryStringW
225 #else
226 #define SZDDESYS_TOPIC "System"
227 #define SZDDESYS_ITEM_TOPICS "Topics"
228 #define SZDDESYS_ITEM_SYSITEMS "SysItems"
229 #define SZDDESYS_ITEM_RTNMSG "ReturnMessage"
230 #define SZDDESYS_ITEM_STATUS "Status"
231 #define SZDDESYS_ITEM_FORMATS "Formats"
232 #define SZDDESYS_ITEM_HELP "Help"
233 #define SZDDE_ITEM_ITEMLIST "TopicItemList"
234 #define DdeCreateStringHandle DdeCreateStringHandleA
235 #define DdeInitialize DdeInitializeA
236 #define DdeQueryString DdeQueryStringA
237 #endif
238 #ifdef __cplusplus
240 #endif
241 #endif /* _DDEML_H */