home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 6.ddi / WINCLUDE.ZIP / DDE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  4.8 KB  |  151 lines

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