1 | /* $Id: dde.cpp,v 1.9 2000-01-18 20:10:34 sandervl Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Win32 default window API functions for OS/2
|
---|
5 | *
|
---|
6 | * Copyright 1998 Sander van Leeuwen
|
---|
7 | *
|
---|
8 | *
|
---|
9 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
10 | *
|
---|
11 | */
|
---|
12 | #include <os2win.h>
|
---|
13 | #include <misc.h>
|
---|
14 | //******************************************************************************
|
---|
15 | //******************************************************************************
|
---|
16 | BOOL WIN32API DdeAbandonTransaction( DWORD arg1, HCONV arg2, DWORD arg3)
|
---|
17 | {
|
---|
18 | dprintf(("USER32: DdeAbandonTransaction\n"));
|
---|
19 | return O32_DdeAbandonTransaction(arg1, arg2, arg3);
|
---|
20 | }
|
---|
21 | //******************************************************************************
|
---|
22 | //******************************************************************************
|
---|
23 | PBYTE WIN32API DdeAccessData(HDDEDATA arg1, PDWORD arg2)
|
---|
24 | {
|
---|
25 | dprintf(("USER32: DdeAccessData\n"));
|
---|
26 | return O32_DdeAccessData(arg1, arg2);
|
---|
27 | }
|
---|
28 | //******************************************************************************
|
---|
29 | //******************************************************************************
|
---|
30 | HDDEDATA WIN32API DdeAddData( HDDEDATA arg1, PVOID arg2, DWORD arg3, DWORD arg4)
|
---|
31 | {
|
---|
32 | dprintf(("USER32: DdeAddData"));
|
---|
33 | return O32_DdeAddData(arg1, arg2, arg3, arg4);
|
---|
34 | }
|
---|
35 | //******************************************************************************
|
---|
36 | //******************************************************************************
|
---|
37 | HDDEDATA WIN32API DdeClientTransaction(PVOID arg1, DWORD arg2, HCONV arg3,
|
---|
38 | HSZ arg4, UINT arg5, UINT arg6, DWORD arg7,
|
---|
39 | PDWORD arg8)
|
---|
40 | {
|
---|
41 |
|
---|
42 | dprintf(("USER32: DdeClientTransaction\n"));
|
---|
43 |
|
---|
44 | return O32_DdeClientTransaction(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
|
---|
45 | }
|
---|
46 | //******************************************************************************
|
---|
47 | //******************************************************************************
|
---|
48 | int WIN32API DdeCmpStringHandles( HSZ arg1, HSZ arg2)
|
---|
49 | {
|
---|
50 |
|
---|
51 | dprintf(("USER32: DdeCmpStringHandles\n"));
|
---|
52 |
|
---|
53 | return O32_DdeCmpStringHandles(arg1, arg2);
|
---|
54 | }
|
---|
55 | //******************************************************************************
|
---|
56 | //******************************************************************************
|
---|
57 | HCONV WIN32API DdeConnect( DWORD arg1, HSZ arg2, HSZ arg3, LPCONVCONTEXT arg4)
|
---|
58 | {
|
---|
59 | HCONV rc;
|
---|
60 |
|
---|
61 | rc = O32_DdeConnect(arg1, arg2, arg3, arg4);
|
---|
62 | dprintf(("USER32: DdeConnect %x %x returned %d (%x)", arg2, arg3, rc, DdeGetLastError(arg1)));
|
---|
63 | return rc;
|
---|
64 | }
|
---|
65 | //******************************************************************************
|
---|
66 | //******************************************************************************
|
---|
67 | HCONVLIST WIN32API DdeConnectList(DWORD arg1, HSZ arg2, HSZ arg3, HCONVLIST arg4, LPCONVCONTEXT arg5)
|
---|
68 | {
|
---|
69 |
|
---|
70 | dprintf(("USER32: DdeConnectList\n"));
|
---|
71 |
|
---|
72 | return O32_DdeConnectList(arg1, arg2, arg3, arg4, arg5);
|
---|
73 | }
|
---|
74 | //******************************************************************************
|
---|
75 | //******************************************************************************
|
---|
76 | HDDEDATA WIN32API DdeCreateDataHandle(DWORD arg1, PVOID arg2, DWORD arg3, DWORD arg4,
|
---|
77 | HSZ arg5, UINT arg6, UINT arg7)
|
---|
78 | {
|
---|
79 | dprintf(("USER32: DdeCreateDataHandle\n"));
|
---|
80 | return O32_DdeCreateDataHandle(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
---|
81 | }
|
---|
82 | //******************************************************************************
|
---|
83 | //******************************************************************************
|
---|
84 | HSZ WIN32API DdeCreateStringHandleA(DWORD arg1, LPCSTR arg2, int arg3)
|
---|
85 | {
|
---|
86 | HSZ rc;
|
---|
87 |
|
---|
88 | rc = O32_DdeCreateStringHandle(arg1, arg2, arg3);
|
---|
89 | dprintf(("USER32: OS2DdeCreateStringHandleA %s returned %x", arg2, rc));
|
---|
90 | return rc;
|
---|
91 | }
|
---|
92 | //******************************************************************************
|
---|
93 | //******************************************************************************
|
---|
94 | HSZ WIN32API DdeCreateStringHandleW(DWORD arg1, LPCWSTR arg2, int arg3)
|
---|
95 | {
|
---|
96 | char *astring = UnicodeToAsciiString((LPWSTR)arg2);
|
---|
97 | HSZ rc;
|
---|
98 |
|
---|
99 | dprintf(("USER32: DdeCreateStringHandleW DOESN'T WORK\n"));
|
---|
100 | rc = O32_DdeCreateStringHandle(arg1, astring, arg3);
|
---|
101 | FreeAsciiString(astring);
|
---|
102 | return rc;
|
---|
103 | }
|
---|
104 | //******************************************************************************
|
---|
105 | //******************************************************************************
|
---|
106 | BOOL WIN32API DdeDisconnect(HCONV arg1)
|
---|
107 | {
|
---|
108 |
|
---|
109 | dprintf(("USER32: DdeDisconnect\n"));
|
---|
110 |
|
---|
111 | return O32_DdeDisconnect(arg1);
|
---|
112 | }
|
---|
113 | //******************************************************************************
|
---|
114 | //******************************************************************************
|
---|
115 | BOOL WIN32API DdeDisconnectList( HCONVLIST arg1)
|
---|
116 | {
|
---|
117 |
|
---|
118 | dprintf(("USER32: DdeDisconnectList\n"));
|
---|
119 |
|
---|
120 | return O32_DdeDisconnectList(arg1);
|
---|
121 | }
|
---|
122 | //******************************************************************************
|
---|
123 | //******************************************************************************
|
---|
124 | BOOL WIN32API DdeEnableCallback(DWORD arg1, HCONV arg2, UINT arg3)
|
---|
125 | {
|
---|
126 |
|
---|
127 | dprintf(("USER32: DdeEnableCallback\n"));
|
---|
128 |
|
---|
129 | return O32_DdeEnableCallback(arg1, arg2, arg3);
|
---|
130 | }
|
---|
131 | //******************************************************************************
|
---|
132 | //******************************************************************************
|
---|
133 | BOOL WIN32API DdeFreeDataHandle( HDDEDATA arg1)
|
---|
134 | {
|
---|
135 |
|
---|
136 | dprintf(("USER32: DdeFreeDataHandle\n"));
|
---|
137 |
|
---|
138 | return O32_DdeFreeDataHandle(arg1);
|
---|
139 | }
|
---|
140 | //******************************************************************************
|
---|
141 | //******************************************************************************
|
---|
142 | BOOL WIN32API DdeFreeStringHandle(DWORD arg1, HSZ arg2)
|
---|
143 | {
|
---|
144 |
|
---|
145 | dprintf(("USER32: DdeFreeStringHandle\n"));
|
---|
146 |
|
---|
147 | return O32_DdeFreeStringHandle(arg1, arg2);
|
---|
148 | }
|
---|
149 | //******************************************************************************
|
---|
150 | //******************************************************************************
|
---|
151 | DWORD WIN32API DdeGetData( HDDEDATA arg1, PVOID arg2, DWORD arg3, DWORD arg4)
|
---|
152 | {
|
---|
153 |
|
---|
154 | dprintf(("USER32: DdeGetData\n"));
|
---|
155 |
|
---|
156 | return O32_DdeGetData(arg1, arg2, arg3, arg4);
|
---|
157 | }
|
---|
158 | //******************************************************************************
|
---|
159 | //******************************************************************************
|
---|
160 | UINT WIN32API DdeGetLastError(DWORD arg1)
|
---|
161 | {
|
---|
162 |
|
---|
163 | dprintf(("USER32: DdeGetLastError\n"));
|
---|
164 |
|
---|
165 | return O32_DdeGetLastError(arg1);
|
---|
166 | }
|
---|
167 | //******************************************************************************
|
---|
168 | //******************************************************************************
|
---|
169 | UINT WIN32API DdeInitializeA(PDWORD arg1, PFNCALLBACK arg2, DWORD arg3, DWORD arg4)
|
---|
170 | {
|
---|
171 | UINT rc;
|
---|
172 |
|
---|
173 | rc = O32_DdeInitialize(arg1, arg2, arg3, arg4);
|
---|
174 |
|
---|
175 | dprintf(("USER32: DdeInitializeA\n"));
|
---|
176 | return rc;
|
---|
177 | }
|
---|
178 | //******************************************************************************
|
---|
179 | //******************************************************************************
|
---|
180 | UINT WIN32API DdeInitializeW(PDWORD arg1, PFNCALLBACK arg2, DWORD arg3, DWORD arg4)
|
---|
181 | {
|
---|
182 |
|
---|
183 | dprintf(("USER32: DdeInitializeW\n"));
|
---|
184 |
|
---|
185 | // NOTE: This will not work as is (needs UNICODE support)
|
---|
186 | return O32_DdeInitialize(arg1, arg2, arg3, arg4);
|
---|
187 | }
|
---|
188 | //******************************************************************************
|
---|
189 | //******************************************************************************
|
---|
190 | BOOL WIN32API DdeKeepStringHandle(DWORD arg1, HSZ arg2)
|
---|
191 | {
|
---|
192 |
|
---|
193 | dprintf(("USER32: DdeKeepStringHandle\n"));
|
---|
194 |
|
---|
195 | return O32_DdeKeepStringHandle(arg1, arg2);
|
---|
196 | }
|
---|
197 | //******************************************************************************
|
---|
198 | //******************************************************************************
|
---|
199 | HDDEDATA WIN32API DdeNameService( DWORD arg1, HSZ arg2, HSZ arg3, UINT arg4)
|
---|
200 | {
|
---|
201 |
|
---|
202 | dprintf(("USER32: DdeNameService\n"));
|
---|
203 |
|
---|
204 | return O32_DdeNameService(arg1, arg2, arg3, arg4);
|
---|
205 | }
|
---|
206 | //******************************************************************************
|
---|
207 | //******************************************************************************
|
---|
208 | BOOL WIN32API DdePostAdvise(DWORD arg1, HSZ arg2, HSZ arg3)
|
---|
209 | {
|
---|
210 |
|
---|
211 | dprintf(("USER32: DdePostAdvise\n"));
|
---|
212 |
|
---|
213 | return O32_DdePostAdvise(arg1, arg2, arg3);
|
---|
214 | }
|
---|
215 | //******************************************************************************
|
---|
216 | //******************************************************************************
|
---|
217 | UINT WIN32API DdeQueryConvInfo( HCONV arg1, DWORD arg2, LPCONVINFO arg3)
|
---|
218 | {
|
---|
219 |
|
---|
220 | dprintf(("USER32: DdeQueryConvInfo\n"));
|
---|
221 |
|
---|
222 | return O32_DdeQueryConvInfo(arg1, arg2, arg3);
|
---|
223 | }
|
---|
224 | //******************************************************************************
|
---|
225 | //******************************************************************************
|
---|
226 | HCONV WIN32API DdeQueryNextServer( HCONVLIST arg1, HCONV arg2)
|
---|
227 | {
|
---|
228 |
|
---|
229 | dprintf(("USER32: DdeQueryNextServer\n"));
|
---|
230 |
|
---|
231 | return O32_DdeQueryNextServer(arg1, arg2);
|
---|
232 | }
|
---|
233 | //******************************************************************************
|
---|
234 | //******************************************************************************
|
---|
235 | DWORD WIN32API DdeQueryStringA(DWORD arg1, HSZ arg2, LPSTR arg3, DWORD arg4, int arg5)
|
---|
236 | {
|
---|
237 |
|
---|
238 | dprintf(("USER32: DdeQueryStringA\n"));
|
---|
239 |
|
---|
240 | return O32_DdeQueryString(arg1, arg2, arg3, arg4, arg5);
|
---|
241 | }
|
---|
242 | //******************************************************************************
|
---|
243 | //******************************************************************************
|
---|
244 | DWORD WIN32API DdeQueryStringW(DWORD arg1, HSZ arg2, LPWSTR arg3, DWORD arg4, int arg5)
|
---|
245 | {
|
---|
246 | char *astring = UnicodeToAsciiString(arg3);
|
---|
247 | DWORD rc;
|
---|
248 |
|
---|
249 | dprintf(("USER32: DdeQueryStringW\n"));
|
---|
250 | rc = O32_DdeQueryString(arg1, arg2, astring, arg4, arg5);
|
---|
251 | FreeAsciiString(astring);
|
---|
252 | return rc;
|
---|
253 | }
|
---|
254 | //******************************************************************************
|
---|
255 | //******************************************************************************
|
---|
256 | HCONV WIN32API DdeReconnect( HCONV arg1)
|
---|
257 | {
|
---|
258 |
|
---|
259 | dprintf(("USER32: DdeReconnect\n"));
|
---|
260 |
|
---|
261 | return O32_DdeReconnect(arg1);
|
---|
262 | }
|
---|
263 | //******************************************************************************
|
---|
264 | //******************************************************************************
|
---|
265 | BOOL WIN32API DdeSetUserHandle( HCONV arg1, DWORD arg2, DWORD arg3)
|
---|
266 | {
|
---|
267 |
|
---|
268 | dprintf(("USER32: DdeSetUserHandle\n"));
|
---|
269 |
|
---|
270 | return O32_DdeSetUserHandle(arg1, arg2, arg3);
|
---|
271 | }
|
---|
272 | //******************************************************************************
|
---|
273 | //******************************************************************************
|
---|
274 | BOOL WIN32API DdeUnaccessData( HDDEDATA arg1)
|
---|
275 | {
|
---|
276 |
|
---|
277 | dprintf(("USER32: DdeUnaccessData\n"));
|
---|
278 |
|
---|
279 | return O32_DdeUnaccessData(arg1);
|
---|
280 | }
|
---|
281 | //******************************************************************************
|
---|
282 | //******************************************************************************
|
---|
283 | BOOL WIN32API DdeUninitialize(DWORD arg1)
|
---|
284 | {
|
---|
285 |
|
---|
286 | dprintf(("USER32: DdeUninitialize\n"));
|
---|
287 |
|
---|
288 | return O32_DdeUninitialize(arg1);
|
---|
289 | }
|
---|
290 | //******************************************************************************
|
---|
291 | //******************************************************************************
|
---|
292 | BOOL WIN32API FreeDDElParam( UINT arg1, LONG arg2)
|
---|
293 | {
|
---|
294 |
|
---|
295 | dprintf(("USER32: FreeDDElParam\n"));
|
---|
296 |
|
---|
297 | return O32_FreeDDElParam(arg1, arg2);
|
---|
298 | }
|
---|
299 | //******************************************************************************
|
---|
300 | //******************************************************************************
|
---|
301 | LONG WIN32API PackDDElParam(UINT arg1, UINT arg2, UINT arg3)
|
---|
302 | {
|
---|
303 |
|
---|
304 | dprintf(("USER32: PackDDElParam\n"));
|
---|
305 |
|
---|
306 | return O32_PackDDElParam(arg1, arg2, arg3);
|
---|
307 | }
|
---|
308 | //******************************************************************************
|
---|
309 | //******************************************************************************
|
---|
310 | UINT WIN32API ReuseDDElParam( UINT arg1, UINT arg2, UINT arg3, UINT arg4, UINT arg5)
|
---|
311 | {
|
---|
312 |
|
---|
313 | dprintf(("USER32: ReuseDDElParam\n"));
|
---|
314 |
|
---|
315 | return O32_ReuseDDElParam(arg1, arg2, arg3, arg4, arg5);
|
---|
316 | }
|
---|
317 | //******************************************************************************
|
---|
318 | //******************************************************************************
|
---|
319 | BOOL WIN32API UnpackDDElParam(UINT arg1, UINT arg2, LPUINT arg3, LPUINT arg4)
|
---|
320 | {
|
---|
321 |
|
---|
322 | dprintf(("USER32: UnpackDDElParam\n"));
|
---|
323 |
|
---|
324 | return O32_UnpackDDElParam(arg1, arg2, arg3, arg4);
|
---|
325 | }
|
---|
326 | //******************************************************************************
|
---|
327 | //******************************************************************************
|
---|
328 | /*****************************************************************************
|
---|
329 | * Name : BOOL WIN32API DdeImpersonateClient
|
---|
330 | * Purpose : The DdeImpersonateClient function impersonates a dynamic data
|
---|
331 | * exchange (DDE) client application in a DDE client conversation.
|
---|
332 | * Parameters: HCONV hConv handle of the DDE conversation
|
---|
333 | * Variables :
|
---|
334 | * Result : If the function succeeds, the return value is TRUE.
|
---|
335 | * If the function fails, the return value is FALSE. To get
|
---|
336 | * extended error information, call GetLastError.
|
---|
337 | * Remark :
|
---|
338 | * Status : UNTESTED STUB
|
---|
339 | *
|
---|
340 | * Author : Patrick Haller [Thu, 1998/02/26 11:55]
|
---|
341 | *****************************************************************************/
|
---|
342 |
|
---|
343 | BOOL WIN32API DdeImpersonateClient(HCONV hConv)
|
---|
344 | {
|
---|
345 | dprintf(("USER32:DdeImpersonateClient (%08x) not implemented.\n",
|
---|
346 | hConv));
|
---|
347 |
|
---|
348 | return (TRUE);
|
---|
349 | }
|
---|
350 |
|
---|
351 |
|
---|
352 | /*****************************************************************************
|
---|
353 | * Name : BOOL WIN32API DdeSetQualityOfService
|
---|
354 | * Purpose : The DdeSetQualityOfService function specifies the quality of
|
---|
355 | * service a raw DDE application desires for future DDE conversations
|
---|
356 | * it initiates.
|
---|
357 | * Parameters:
|
---|
358 | * Variables :
|
---|
359 | * Result : If the function succeeds, the return value is TRUE.
|
---|
360 | * If the function fails, the return value is FALSE. To get
|
---|
361 | * extended error information, call GetLastError.
|
---|
362 | * Remark :
|
---|
363 | * Status : UNTESTED STUB
|
---|
364 | *
|
---|
365 | * Author : Patrick Haller [Thu, 1998/02/26 11:55]
|
---|
366 | *****************************************************************************/
|
---|
367 |
|
---|
368 | BOOL WIN32API DdeSetQualityOfService (HWND hwndClient,
|
---|
369 | CONST SECURITY_QUALITY_OF_SERVICE *pqosNew,
|
---|
370 | PSECURITY_QUALITY_OF_SERVICE pqosPrev)
|
---|
371 | {
|
---|
372 | dprintf(("USER32:DdeSetQualityOfService(%08xh,%08xh,%08x) not implemented.\n",
|
---|
373 | hwndClient,
|
---|
374 | pqosNew,
|
---|
375 | pqosPrev));
|
---|
376 |
|
---|
377 | return (FALSE);
|
---|
378 | }
|
---|
379 | /*****************************************************************************
|
---|
380 | * Name : BOOL WIN32API ImpersonateDdeClientWindow
|
---|
381 | * Purpose : The ImpersonateDdeClientWindow function enables a DDE server
|
---|
382 | * application to impersonate a DDE client application's security
|
---|
383 | * context in order to protect secure server data from unauthorized
|
---|
384 | * DDE clients.
|
---|
385 | * Parameters: HWND hWndClient handle of DDE client window
|
---|
386 | * HWND hWndServer handle of DDE server window
|
---|
387 | * Variables :
|
---|
388 | * Result : If the function succeeds, the return value is TRUE.
|
---|
389 | * If the function fails, the return value is FALSE. To get extended
|
---|
390 | * error information, call GetLastError.
|
---|
391 | * Remark :
|
---|
392 | * Status : UNTESTED STUB
|
---|
393 | *
|
---|
394 | * Author : Patrick Haller [Thu, 1998/02/26 11:55]
|
---|
395 | *****************************************************************************/
|
---|
396 |
|
---|
397 | BOOL WIN32API ImpersonateDdeClientWindow(HWND hWndClient,
|
---|
398 | HWND hWndServer)
|
---|
399 | {
|
---|
400 | dprintf(("USER32:ImpersonateDdeClientWindow (%08xh,%08x) not implemented.\n",
|
---|
401 | hWndClient,
|
---|
402 | hWndServer));
|
---|
403 |
|
---|
404 | return (FALSE);
|
---|
405 | }
|
---|