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