home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / sdk / winh / dde.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-11  |  4.9 KB  |  164 lines

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