home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / dde.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  5.4 KB  |  198 lines

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * dde.h -       Dynamic Data Exchange structures and definitions              *
  4. *                                                                             *
  5. * Copyright (c) 1993-1999, Microsoft Corp.    All rights reserved          *
  6. *                                                                             *
  7. \*****************************************************************************/
  8. #ifndef _DDEHEADER_INCLUDED_
  9. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  10. #define _DDEHEADER_INCLUDED_
  11.  
  12. #if _MSC_VER > 1000
  13. #pragma once
  14. #endif
  15.  
  16. #ifndef _WINDEF_
  17. #include <windef.h>
  18. #endif
  19.  
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23.  
  24. // begin_r_dde
  25.  
  26. /* DDE window messages */
  27.  
  28. #define WM_DDE_FIRST        0x03E0
  29. #define WM_DDE_INITIATE     (WM_DDE_FIRST)
  30. #define WM_DDE_TERMINATE    (WM_DDE_FIRST+1)
  31. #define WM_DDE_ADVISE        (WM_DDE_FIRST+2)
  32. #define WM_DDE_UNADVISE     (WM_DDE_FIRST+3)
  33. #define WM_DDE_ACK            (WM_DDE_FIRST+4)
  34. #define WM_DDE_DATA            (WM_DDE_FIRST+5)
  35. #define WM_DDE_REQUEST        (WM_DDE_FIRST+6)
  36. #define WM_DDE_POKE            (WM_DDE_FIRST+7)
  37. #define WM_DDE_EXECUTE        (WM_DDE_FIRST+8)
  38. #define WM_DDE_LAST            (WM_DDE_FIRST+8)
  39.  
  40. // end_r_dde
  41.  
  42. /*----------------------------------------------------------------------------
  43. |       DDEACK structure
  44. |
  45. |    Structure of wStatus (LOWORD(lParam)) in WM_DDE_ACK message
  46. |       sent in response to a WM_DDE_DATA, WM_DDE_REQUEST, WM_DDE_POKE,
  47. |       WM_DDE_ADVISE, or WM_DDE_UNADVISE message.
  48. |
  49. ----------------------------------------------------------------------------*/
  50.  
  51. typedef struct {
  52. #ifndef _MAC
  53.         unsigned short bAppReturnCode:8,
  54.                  reserved:6,
  55.                  fBusy:1,
  56.          fAck:1;
  57. #else
  58.         unsigned short usFlags;
  59. #endif
  60. } DDEACK;
  61.  
  62.  
  63. /*----------------------------------------------------------------------------
  64. |       DDEADVISE structure
  65. |
  66. |    WM_DDE_ADVISE parameter structure for hOptions (LOWORD(lParam))
  67. |
  68. ----------------------------------------------------------------------------*/
  69.  
  70. typedef struct {
  71. #ifndef _MAC
  72.         unsigned short reserved:14,
  73.                  fDeferUpd:1,
  74.          fAckReq:1;
  75. #else
  76.         unsigned short usFlags;
  77. #endif
  78.     short     cfFormat;
  79. } DDEADVISE;
  80.  
  81.  
  82. /*----------------------------------------------------------------------------
  83. |       DDEDATA structure
  84. |
  85. |       WM_DDE_DATA parameter structure for hData (LOWORD(lParam)).
  86. |       The actual size of this structure depends on the size of
  87. |       the Value array.
  88. |
  89. ----------------------------------------------------------------------------*/
  90.  
  91. typedef struct {
  92. #ifndef _MAC
  93.     unsigned short unused:12,
  94.                  fResponse:1,
  95.                  fRelease:1,
  96.                  reserved:1,
  97.                  fAckReq:1;
  98. #else
  99.     unsigned short usFlags;
  100. #endif
  101.     short     cfFormat;
  102.     BYTE     Value[1];
  103. } DDEDATA;
  104.  
  105.  
  106. /*----------------------------------------------------------------------------
  107. |    DDEPOKE structure
  108. |
  109. |    WM_DDE_POKE parameter structure for hData (LOWORD(lParam)).
  110. |       The actual size of this structure depends on the size of
  111. |       the Value array.
  112. |
  113. ----------------------------------------------------------------------------*/
  114.  
  115. typedef struct {
  116. #ifndef _MAC
  117.     unsigned short unused:13,  /* Earlier versions of DDE.H incorrectly */
  118.                              /* 12 unused bits.                       */
  119.          fRelease:1,
  120.          fReserved:2;
  121. #else
  122.     unsigned short usFlags;
  123. #endif
  124.     short    cfFormat;
  125.     BYTE     Value[1];  /* This member was named rgb[1] in previous */
  126.                             /* versions of DDE.H                        */
  127.  
  128. } DDEPOKE;
  129.  
  130. /*----------------------------------------------------------------------------
  131. The following typedef's were used in previous versions of the Windows SDK.
  132. They are still valid.  The above typedef's define exactly the same structures
  133. as those below.  The above typedef names are recommended, however, as they
  134. are more meaningful.
  135.  
  136. Note that the DDEPOKE structure typedef'ed in earlier versions of DDE.H did
  137. not correctly define the bit positions.
  138. ----------------------------------------------------------------------------*/
  139.  
  140. typedef struct {
  141. #ifndef _MAC
  142.         unsigned short unused:13,
  143.                  fRelease:1,
  144.                  fDeferUpd:1,
  145.          fAckReq:1;
  146. #else
  147.     unsigned short usFlags;
  148. #endif
  149.     short     cfFormat;
  150. } DDELN;
  151.  
  152. typedef struct {
  153. #ifndef _MAC
  154.     unsigned short unused:12,
  155.                  fAck:1,
  156.                  fRelease:1,
  157.                  fReserved:1,
  158.                  fAckReq:1;
  159. #else
  160.     unsigned short usFlags;
  161. #endif
  162.     short     cfFormat;
  163.     BYTE     rgb[1];
  164. } DDEUP;
  165.  
  166.  
  167. /*
  168.  * DDE SECURITY
  169.  */
  170.  
  171. BOOL
  172. WINAPI
  173. DdeSetQualityOfService(
  174.     HWND hwndClient,
  175.     CONST SECURITY_QUALITY_OF_SERVICE *pqosNew,
  176.     PSECURITY_QUALITY_OF_SERVICE pqosPrev);
  177.  
  178. BOOL
  179. WINAPI
  180. ImpersonateDdeClientWindow(
  181.     HWND hWndClient,
  182.     HWND hWndServer);
  183.  
  184. /*
  185.  * DDE message packing APIs
  186.  */
  187. LPARAM APIENTRY PackDDElParam(UINT msg, UINT_PTR uiLo, UINT_PTR uiHi);
  188. BOOL   APIENTRY UnpackDDElParam(UINT msg, LPARAM lParam, PUINT_PTR puiLo, PUINT_PTR puiHi);
  189. BOOL   APIENTRY FreeDDElParam(UINT msg, LPARAM lParam);
  190. LPARAM APIENTRY ReuseDDElParam(LPARAM lParam, UINT msgIn, UINT msgOut, UINT_PTR uiLo, UINT_PTR uiHi);
  191.  
  192. #ifdef __cplusplus
  193. }
  194. #endif
  195.  
  196. #pragma option pop /*P_O_Pop*/
  197. #endif // _DDEHEADER_INCLUDED_
  198.