Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

dde.cpp

Go to the documentation of this file.
00001 /* $Id: dde.cpp,v 1.14 2001/08/11 12:03:35 sandervl Exp $ */
00002 
00003 /*
00004  * Win32 default window API functions for OS/2
00005  *
00006  * Copyright 1998 Sander van Leeuwen
00007  *
00008  *
00009  * Project Odin Software License can be found in LICENSE.TXT
00010  *
00011  */
00012 #include <os2win.h>
00013 #include <misc.h>
00014 #include <unicode.h>
00015 
00016 #define DBG_LOCALLOG    DBG_dde
00017 #include "dbglocal.h"
00018 
00019 //******************************************************************************
00020 //******************************************************************************
00021 BOOL WIN32API DdeAbandonTransaction( DWORD arg1, HCONV arg2, DWORD  arg3)
00022 {
00023     dprintf(("USER32: DdeAbandonTransaction %x %x %x", arg1, arg2, arg3));
00024     return O32_DdeAbandonTransaction(arg1, arg2, arg3);
00025 }
00026 //******************************************************************************
00027 //******************************************************************************
00028 PBYTE WIN32API DdeAccessData(HDDEDATA arg1, PDWORD  arg2)
00029 {
00030     dprintf(("USER32: DdeAccessData %x %x", arg1, arg2));
00031     return O32_DdeAccessData(arg1, arg2);
00032 }
00033 //******************************************************************************
00034 //******************************************************************************
00035 HDDEDATA WIN32API DdeAddData( HDDEDATA arg1, PVOID arg2, DWORD arg3, DWORD  arg4)
00036 {
00037     dprintf(("USER32: DdeAddData %x %x %x %x", arg1, arg2, arg3, arg4));
00038     return O32_DdeAddData(arg1, arg2, arg3, arg4);
00039 }
00040 //******************************************************************************
00041 //******************************************************************************
00042 HDDEDATA WIN32API DdeClientTransaction(PVOID arg1, DWORD arg2, HCONV arg3, 
00043                                        HSZ arg4, UINT arg5, UINT arg6, DWORD arg7, 
00044                                        PDWORD  arg8)
00045 {
00046     dprintf(("USER32: DdeClientTransaction %x %x %x %x %x %x %x %x", arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8));
00047 
00048     return O32_DdeClientTransaction(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
00049 }
00050 //******************************************************************************
00051 //******************************************************************************
00052 int WIN32API DdeCmpStringHandles( HSZ arg1, HSZ  arg2)
00053 {
00054     dprintf(("USER32: DdeCmpStringHandles %x %x", arg1, arg2));
00055 
00056     return O32_DdeCmpStringHandles(arg1, arg2);
00057 }
00058 //******************************************************************************
00059 //******************************************************************************
00060 HCONV WIN32API DdeConnect(DWORD idInst, HSZ hszService, HSZ hszTopic, 
00061                           LPCONVCONTEXT pCC)
00062 {
00063  HCONV rc;
00064 
00065     rc = O32_DdeConnect(idInst, hszService, hszTopic, pCC);
00066     dprintf(("USER32: DdeConnect %x %x %x %x returned %d (%x)", idInst, hszService, hszTopic, pCC, rc, DdeGetLastError(idInst)));
00067     return rc;
00068 }
00069 //******************************************************************************
00070 //******************************************************************************
00071 HCONVLIST WIN32API DdeConnectList(DWORD arg1, HSZ arg2, HSZ arg3, HCONVLIST arg4, LPCONVCONTEXT  arg5)
00072 {
00073 
00074     dprintf(("USER32: DdeConnectList %x %x %x %x %x", arg1, arg2, arg3, arg4, arg5));
00075 
00076     return O32_DdeConnectList(arg1, arg2, arg3, arg4, arg5);
00077 }
00078 //******************************************************************************
00079 //******************************************************************************
00080 HDDEDATA WIN32API DdeCreateDataHandle(DWORD arg1, PVOID arg2, DWORD arg3, DWORD arg4, 
00081                                       HSZ arg5, UINT arg6, UINT  arg7)
00082 {
00083     dprintf(("USER32: DdeCreateDataHandle %x %x %x %x %x %x %x", arg1, arg2, arg3, arg4, arg5, arg6, arg7));
00084     return O32_DdeCreateDataHandle(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
00085 }
00086 //******************************************************************************
00087 //******************************************************************************
00088 HSZ WIN32API DdeCreateStringHandleA(DWORD idInst, LPCSTR lpszString, int codepage)
00089 {
00090  HSZ rc;
00091 
00092     rc = O32_DdeCreateStringHandle(idInst, lpszString, codepage);
00093     dprintf(("USER32: DdeCreateStringHandleA %x %s %x returned %x", idInst, lpszString, codepage, rc));
00094     return rc;
00095 }
00096 //******************************************************************************
00097 //******************************************************************************
00098 HSZ WIN32API DdeCreateStringHandleW(DWORD arg1, LPCWSTR arg2, int arg3)
00099 {
00100  char *astring = UnicodeToAsciiString((LPWSTR)arg2);
00101  HSZ   rc;
00102 
00103     dprintf(("USER32:  DdeCreateStringHandleW DOESN'T WORK\n"));
00104     rc = O32_DdeCreateStringHandle(arg1, astring, arg3);
00105     FreeAsciiString(astring);
00106     return rc;
00107 }
00108 //******************************************************************************
00109 //******************************************************************************
00110 BOOL WIN32API DdeDisconnect(HCONV arg1)
00111 {
00112     dprintf(("USER32: DdeDisconnect %x", arg1));
00113 
00114     return O32_DdeDisconnect(arg1);
00115 }
00116 //******************************************************************************
00117 //******************************************************************************
00118 BOOL WIN32API DdeDisconnectList( HCONVLIST arg1)
00119 {
00120     dprintf(("USER32: DdeDisconnectList %x", arg1));
00121 
00122     return O32_DdeDisconnectList(arg1);
00123 }
00124 //******************************************************************************
00125 //******************************************************************************
00126 BOOL WIN32API DdeEnableCallback(DWORD arg1, HCONV arg2, UINT  arg3)
00127 {
00128     dprintf(("USER32: DdeEnableCallback %x %x %x", arg1, arg2, arg3));
00129 
00130     return O32_DdeEnableCallback(arg1, arg2, arg3);
00131 }
00132 //******************************************************************************
00133 //******************************************************************************
00134 BOOL WIN32API DdeFreeDataHandle( HDDEDATA arg1)
00135 {
00136     dprintf(("USER32: DdeFreeDataHandle %x", arg1));
00137 
00138     return O32_DdeFreeDataHandle(arg1);
00139 }
00140 //******************************************************************************
00141 //******************************************************************************
00142 BOOL WIN32API DdeFreeStringHandle(DWORD arg1, HSZ  arg2)
00143 {
00144     dprintf(("USER32: DdeFreeStringHandle %x %x", arg1, arg2));
00145 
00146     return O32_DdeFreeStringHandle(arg1, arg2);
00147 }
00148 //******************************************************************************
00149 //******************************************************************************
00150 DWORD WIN32API DdeGetData( HDDEDATA arg1, PVOID arg2, DWORD arg3, DWORD  arg4)
00151 {
00152     dprintf(("USER32: DdeGetData %x %x %x %x", arg1, arg2, arg3, arg4));
00153 
00154     return O32_DdeGetData(arg1, arg2, arg3, arg4);
00155 }
00156 //******************************************************************************
00157 //******************************************************************************
00158 UINT WIN32API DdeGetLastError(DWORD arg1)
00159 {
00160     dprintf(("USER32: DdeGetLastError %x", arg1));
00161 
00162     return O32_DdeGetLastError(arg1);
00163 }
00164 #ifdef USING_OPEN32
00165 //******************************************************************************
00166 //******************************************************************************
00167 HDDEDATA EXPENTRY_O32 DdeCallback(UINT uType, UINT uFmt, HCONV hconv, HSZ hsz1, 
00168                                   HSZ hsz2, HDDEDATA hdata, DWORD dwData1, 
00169                                   DWORD dwData2) 
00170 {
00171    dprintf(("DdeCallback %x %x %x %x %x %x %x %x", uType, uFmt, hconv, hsz1, hsz2,
00172             hdata, dwData1, dwData2));
00173    return 0;
00174 }
00175 #endif
00176 //******************************************************************************
00177 //******************************************************************************
00178 UINT WIN32API DdeInitializeA(PDWORD lpidInst, PFNCALLBACK pfnCallback, 
00179                              DWORD afCmd, DWORD ulRes)
00180 {
00181  UINT ret;
00182 
00183 #ifdef USING_OPEN32
00184     ret = O32_DdeInitialize(lpidInst, (PFNCALLBACK_O32)DdeCallback, afCmd, ulRes);
00185 #else
00186     ret = O32_DdeInitialize(lpidInst, (PFNCALLBACK_O32)pfnCallback, afCmd, ulRes);
00187 #endif
00188     dprintf(("USER32: DdeInitialize %x %x %x %x returned %x", lpidInst, pfnCallback, afCmd, ulRes, ret));
00189     return ret;
00190 }
00191 //******************************************************************************
00192 //******************************************************************************
00193 UINT WIN32API DdeInitializeW(PDWORD lpidInst, PFNCALLBACK pfnCallback, 
00194                              DWORD afCmd, DWORD ulRes)
00195 {
00196  UINT ret;
00197 
00198     // NOTE: This will not work as is (needs UNICODE support)
00199 #ifdef USING_OPEN32
00200     ret = O32_DdeInitialize(lpidInst, (PFNCALLBACK_O32)DdeCallback, afCmd, ulRes);
00201 #else
00202     ret = O32_DdeInitialize(lpidInst, (PFNCALLBACK_O32)pfnCallback, afCmd, ulRes);
00203 #endif
00204     dprintf(("USER32: DdeInitializeW %x %x %x %x returned %x", lpidInst, pfnCallback, afCmd, ulRes, ret));
00205     return ret;
00206 //    return O32_DdeInitialize(arg1, arg2, arg3, arg4);
00207 }
00208 //******************************************************************************
00209 //******************************************************************************
00210 BOOL WIN32API DdeKeepStringHandle(DWORD arg1, HSZ arg2)
00211 {
00212     dprintf(("USER32: DdeKeepStringHandle %x %x", arg1, arg2));
00213 
00214     return O32_DdeKeepStringHandle(arg1, arg2);
00215 }
00216 //******************************************************************************
00217 //******************************************************************************
00218 HDDEDATA WIN32API DdeNameService( DWORD arg1, HSZ  arg2, HSZ  arg3, UINT  arg4)
00219 {
00220     dprintf(("USER32: DdeNameService %x %x %x %x", arg1, arg2, arg3, arg4));
00221 
00222     return O32_DdeNameService(arg1, arg2, arg3, arg4);
00223 }
00224 //******************************************************************************
00225 //******************************************************************************
00226 BOOL WIN32API DdePostAdvise(DWORD arg1, HSZ arg2, HSZ  arg3)
00227 {
00228 
00229     dprintf(("USER32:  DdePostAdvise\n"));
00230 
00231     return O32_DdePostAdvise(arg1, arg2, arg3);
00232 }
00233 //******************************************************************************
00234 //******************************************************************************
00235 UINT WIN32API DdeQueryConvInfo( HCONV arg1, DWORD arg2, LPCONVINFO  arg3)
00236 {
00237 
00238     dprintf(("USER32:  DdeQueryConvInfo\n"));
00239 
00240     return O32_DdeQueryConvInfo(arg1, arg2, arg3);
00241 }
00242 //******************************************************************************
00243 //******************************************************************************
00244 HCONV WIN32API DdeQueryNextServer( HCONVLIST arg1, HCONV  arg2)
00245 {
00246 
00247     dprintf(("USER32:  DdeQueryNextServer\n"));
00248 
00249     return O32_DdeQueryNextServer(arg1, arg2);
00250 }
00251 //******************************************************************************
00252 //******************************************************************************
00253 DWORD WIN32API DdeQueryStringA(DWORD arg1, HSZ arg2, LPSTR arg3, DWORD arg4, int  arg5)
00254 {
00255 
00256     dprintf(("USER32:  DdeQueryStringA\n"));
00257 
00258     return O32_DdeQueryString(arg1, arg2, arg3, arg4, arg5);
00259 }
00260 //******************************************************************************
00261 //******************************************************************************
00262 DWORD WIN32API DdeQueryStringW(DWORD arg1, HSZ arg2, LPWSTR arg3, DWORD arg4, int  arg5)
00263 {
00264  char *astring = UnicodeToAsciiString(arg3);
00265  DWORD rc;
00266 
00267     dprintf(("USER32:  DdeQueryStringW\n"));
00268     rc = O32_DdeQueryString(arg1, arg2, astring, arg4, arg5);
00269     FreeAsciiString(astring);
00270     return rc;
00271 }
00272 //******************************************************************************
00273 //******************************************************************************
00274 HCONV WIN32API DdeReconnect( HCONV arg1)
00275 {
00276 
00277     dprintf(("USER32:  DdeReconnect\n"));
00278 
00279     return O32_DdeReconnect(arg1);
00280 }
00281 //******************************************************************************
00282 //******************************************************************************
00283 BOOL WIN32API DdeSetUserHandle( HCONV arg1, DWORD arg2, DWORD  arg3)
00284 {
00285 
00286     dprintf(("USER32:  DdeSetUserHandle\n"));
00287 
00288     return O32_DdeSetUserHandle(arg1, arg2, arg3);
00289 }
00290 //******************************************************************************
00291 //******************************************************************************
00292 BOOL WIN32API DdeUnaccessData( HDDEDATA arg1)
00293 {
00294 
00295     dprintf(("USER32:  DdeUnaccessData\n"));
00296 
00297     return O32_DdeUnaccessData(arg1);
00298 }
00299 //******************************************************************************
00300 //******************************************************************************
00301 BOOL WIN32API DdeUninitialize(DWORD arg1)
00302 {
00303 
00304     dprintf(("USER32:  DdeUninitialize\n"));
00305 
00306     return O32_DdeUninitialize(arg1);
00307 }
00308 //******************************************************************************
00309 //******************************************************************************
00310 BOOL WIN32API FreeDDElParam( UINT arg1, LONG  arg2)
00311 {
00312     dprintf(("USER32:  FreeDDElParam\n"));
00313 
00314     return O32_FreeDDElParam(arg1, arg2);
00315 }
00316 //******************************************************************************
00317 //******************************************************************************
00318 LONG WIN32API PackDDElParam(UINT arg1, UINT arg2, UINT  arg3)
00319 {
00320     dprintf(("USER32:  PackDDElParam\n"));
00321 
00322     return O32_PackDDElParam(arg1, arg2, arg3);
00323 }
00324 //******************************************************************************
00325 //******************************************************************************
00326 UINT WIN32API ReuseDDElParam( UINT arg1, UINT arg2, UINT arg3, UINT arg4, UINT arg5)
00327 {
00328     dprintf(("USER32:  ReuseDDElParam\n"));
00329 
00330     return O32_ReuseDDElParam(arg1, arg2, arg3, arg4, arg5);
00331 }
00332 //******************************************************************************
00333 //******************************************************************************
00334 BOOL WIN32API UnpackDDElParam(UINT arg1, UINT arg2, LPUINT arg3, LPUINT  arg4)
00335 {
00336     dprintf(("USER32:  UnpackDDElParam\n"));
00337 
00338     return O32_UnpackDDElParam(arg1, arg2, arg3, arg4);
00339 }
00340 //******************************************************************************
00341 //******************************************************************************
00342 /*****************************************************************************
00343  * Name      : BOOL WIN32API DdeImpersonateClient
00344  * Purpose   : The DdeImpersonateClient function impersonates a dynamic data
00345  *             exchange (DDE) client application in a DDE client conversation.
00346  * Parameters: HCONV hConv handle of the DDE conversation
00347  * Variables :
00348  * Result    : If the function succeeds, the return value is TRUE.
00349  *             If the function fails, the return value is FALSE. To get
00350  *             extended error information, call GetLastError.
00351  * Remark    :
00352  * Status    : UNTESTED STUB
00353  *
00354  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
00355  *****************************************************************************/
00356 
00357 BOOL WIN32API DdeImpersonateClient(HCONV hConv)
00358 {
00359   dprintf(("USER32:DdeImpersonateClient (%08x) not implemented.\n",
00360          hConv));
00361 
00362   return (TRUE);
00363 }
00364 
00365 
00366 /*****************************************************************************
00367  * Name      : BOOL WIN32API DdeSetQualityOfService
00368  * Purpose   : The DdeSetQualityOfService function specifies the quality of
00369  *             service a raw DDE application desires for future DDE conversations
00370  *             it initiates.
00371  * Parameters:
00372  * Variables :
00373  * Result    : If the function succeeds, the return value is TRUE.
00374  *             If the function fails, the return value is FALSE. To get
00375  *             extended error information, call GetLastError.
00376  * Remark    :
00377  * Status    : UNTESTED STUB
00378  *
00379  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
00380  *****************************************************************************/
00381 
00382 BOOL WIN32API DdeSetQualityOfService (HWND hwndClient,
00383                                          CONST SECURITY_QUALITY_OF_SERVICE *pqosNew,
00384                                          PSECURITY_QUALITY_OF_SERVICE pqosPrev)
00385 {
00386   dprintf(("USER32:DdeSetQualityOfService(%08xh,%08xh,%08x) not implemented.\n",
00387          hwndClient,
00388          pqosNew,
00389          pqosPrev));
00390 
00391   return (FALSE);
00392 }
00393 /*****************************************************************************
00394  * Name      : BOOL WIN32API ImpersonateDdeClientWindow
00395  * Purpose   : The ImpersonateDdeClientWindow function enables a DDE server
00396  *             application to impersonate a DDE client application's security
00397  *             context in order to protect secure server data from unauthorized
00398  *             DDE clients.
00399  * Parameters: HWND hWndClient handle of DDE client window
00400  *             HWND hWndServer handle of DDE server window
00401  * Variables :
00402  * Result    : If the function succeeds, the return value is TRUE.
00403  *             If the function fails, the return value is FALSE. To get extended
00404  *               error information, call GetLastError.
00405  * Remark    :
00406  * Status    : UNTESTED STUB
00407  *
00408  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
00409  *****************************************************************************/
00410 
00411 BOOL WIN32API ImpersonateDdeClientWindow(HWND hWndClient,
00412                                             HWND hWndServer)
00413 {
00414   dprintf(("USER32:ImpersonateDdeClientWindow (%08xh,%08x) not implemented.\n",
00415          hWndClient,
00416          hWndServer));
00417 
00418   return (FALSE);
00419 }

Generated on Wed Jan 23 23:17:29 2002 for ODIN-user32 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001