home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / RTLWIN32.PAK / DDE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  5.1 KB  |  180 lines

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