source: trunk/src/user32/dde.cpp@ 5391

Last change on this file since 5391 was 5391, checked in by sandervl, 24 years ago

log msg updates

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