home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c480 / 19.ddi / INCLUDE / DDE.H_ / DDE.H
Encoding:
C/C++ Source or Header  |  1993-02-08  |  4.5 KB  |  147 lines

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * dde.h -       Dynamic Data Exchange structures and definitions              *
  4. *                                                                             *
  5. *               Copyright (c) 1992, Microsoft Corp.  All rights reserved      *
  6. *                                                                             *
  7. \*****************************************************************************/
  8.  
  9. #ifndef _INC_DDE
  10. #define _INC_DDE
  11.  
  12. #ifndef RC_INVOKED
  13. #pragma pack(1)         /* Assume byte packing throughout */
  14. #endif /* RC_INVOKED */
  15.  
  16. #ifdef __cplusplus
  17. extern "C" {            /* Assume C declarations for C++ */
  18. #endif    /* __cplusplus */
  19.  
  20. /* DDE window messages */
  21.  
  22. #define WM_DDE_FIRST        0x03E0
  23. #define WM_DDE_INITIATE     (WM_DDE_FIRST)
  24. #define WM_DDE_TERMINATE    (WM_DDE_FIRST+1)
  25. #define WM_DDE_ADVISE        (WM_DDE_FIRST+2)
  26. #define WM_DDE_UNADVISE     (WM_DDE_FIRST+3)
  27. #define WM_DDE_ACK        (WM_DDE_FIRST+4)
  28. #define WM_DDE_DATA        (WM_DDE_FIRST+5)
  29. #define WM_DDE_REQUEST        (WM_DDE_FIRST+6)
  30. #define WM_DDE_POKE        (WM_DDE_FIRST+7)
  31. #define WM_DDE_EXECUTE        (WM_DDE_FIRST+8)
  32. #define WM_DDE_LAST        (WM_DDE_FIRST+8)
  33.  
  34. /****************************************************************************\
  35. *       DDEACK structure
  36. *
  37. *       Structure of wStatus (LOWORD(lParam)) in WM_DDE_ACK message
  38. *       sent in response to a WM_DDE_DATA, WM_DDE_REQUEST, WM_DDE_POKE,
  39. *       WM_DDE_ADVISE, or WM_DDE_UNADVISE message.
  40. *
  41. \****************************************************************************/
  42.  
  43. typedef struct tagDDEACK
  44. {
  45.     WORD    bAppReturnCode:8,
  46.             reserved:6,
  47.             fBusy:1,
  48.             fAck:1;
  49. } DDEACK;
  50.  
  51. /****************************************************************************\
  52. *       DDEADVISE structure
  53. *
  54. *       WM_DDE_ADVISE parameter structure for hOptions (LOWORD(lParam))
  55. *
  56. \****************************************************************************/
  57.  
  58. typedef struct tagDDEADVISE
  59. {
  60.     WORD    reserved:14,
  61.             fDeferUpd:1,
  62.             fAckReq:1;
  63.     short   cfFormat;
  64. } DDEADVISE;
  65.  
  66. /****************************************************************************\
  67. *       DDEDATA structure
  68. *
  69. *       WM_DDE_DATA parameter structure for hData (LOWORD(lParam)).
  70. *       The actual size of this structure depends on the size of
  71. *       the Value array.
  72. *
  73. \****************************************************************************/
  74.  
  75. typedef struct tagDDEDATA
  76. {
  77.     WORD    unused:12,
  78.             fResponse:1,
  79.             fRelease:1,
  80.             reserved:1,
  81.             fAckReq:1;
  82.     short   cfFormat;
  83.     BYTE     Value[1];
  84. } DDEDATA;
  85.  
  86.  
  87. /****************************************************************************\
  88. *       DDEPOKE structure
  89. *
  90. *       WM_DDE_POKE parameter structure for hData (LOWORD(lParam)).
  91. *       The actual size of this structure depends on the size of
  92. *       the Value array.
  93. *
  94. \****************************************************************************/
  95.  
  96. typedef struct tagDDEPOKE
  97. {
  98.     WORD    unused:13,  /* Earlier versions of DDE.H incorrectly */
  99.                         /* 12 unused bits.                       */
  100.             fRelease:1,
  101.             fReserved:2;
  102.     short   cfFormat;
  103.     BYTE    Value[1];   /* This member was named rgb[1] in previous */
  104.                         /* versions of DDE.H                        */
  105.  
  106. } DDEPOKE;
  107.  
  108. /****************************************************************************\
  109. * The following typedef's were used in previous versions of the Windows SDK.
  110. * They are still valid.  The above typedef's define exactly the same structures
  111. * as those below.  The above typedef names are recommended, however, as they
  112. * are more meaningful.
  113. *
  114. * Note that the DDEPOKE structure typedef'ed in earlier versions of DDE.H did
  115. * not correctly define the bit positions.
  116. \****************************************************************************/
  117.  
  118. typedef struct tagDDELN
  119. {
  120.     WORD    unused:13,
  121.             fRelease:1,
  122.             fDeferUpd:1,
  123.             fAckReq:1;
  124.     short   cfFormat;
  125. } DDELN;
  126.  
  127. typedef struct tagDDEUP
  128. {
  129.     WORD    unused:12,
  130.             fAck:1,
  131.             fRelease:1,
  132.             fReserved:1,
  133.             fAckReq:1;
  134.     short   cfFormat;
  135.     BYTE    rgb[1];
  136. } DDEUP;
  137.  
  138. #ifdef __cplusplus
  139. }
  140. #endif    /* __cplusplus */
  141.  
  142. #ifndef RC_INVOKED
  143. #pragma pack()
  144. #endif  /* RC_INVOKED */
  145.  
  146. #endif  /* _INC_DDE */
  147.