home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Compilers / digital marsC compier / dm / include / win32 / Dde.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-08  |  5.0 KB  |  168 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.  
  11. #ifndef _WINDEF_
  12. #include <windef.h>
  13. #endif
  14.  
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18.  
  19. // begin_r_dde
  20.  
  21. /* DDE window messages */
  22.  
  23. #define WM_DDE_FIRST        0x03E0
  24. #define WM_DDE_INITIATE     (WM_DDE_FIRST)
  25. #define WM_DDE_TERMINATE    (WM_DDE_FIRST+1)
  26. #define WM_DDE_ADVISE        (WM_DDE_FIRST+2)
  27. #define WM_DDE_UNADVISE     (WM_DDE_FIRST+3)
  28. #define WM_DDE_ACK            (WM_DDE_FIRST+4)
  29. #define WM_DDE_DATA            (WM_DDE_FIRST+5)
  30. #define WM_DDE_REQUEST        (WM_DDE_FIRST+6)
  31. #define WM_DDE_POKE            (WM_DDE_FIRST+7)
  32. #define WM_DDE_EXECUTE        (WM_DDE_FIRST+8)
  33. #define WM_DDE_LAST            (WM_DDE_FIRST+8)
  34.  
  35. // end_r_dde
  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 {
  47.         unsigned short bAppReturnCode:8,
  48.                  reserved:6,
  49.                  fBusy:1,
  50.          fAck:1;
  51. } DDEACK;
  52.  
  53.  
  54. /*----------------------------------------------------------------------------
  55. |       DDEADVISE structure
  56. |
  57. |    WM_DDE_ADVISE parameter structure for hOptions (LOWORD(lParam))
  58. |
  59. ----------------------------------------------------------------------------*/
  60.  
  61. typedef struct {
  62.         unsigned short reserved:14,
  63.                  fDeferUpd:1,
  64.          fAckReq:1;
  65.     short     cfFormat;
  66. } DDEADVISE;
  67.  
  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 {
  79.     unsigned short unused:12,
  80.                  fResponse:1,
  81.                  fRelease:1,
  82.                  reserved:1,
  83.                  fAckReq:1;
  84.     short     cfFormat;
  85.     BYTE     Value[1];
  86. } DDEDATA;
  87.  
  88.  
  89. /*----------------------------------------------------------------------------
  90. |    DDEPOKE structure
  91. |
  92. |    WM_DDE_POKE parameter structure for hData (LOWORD(lParam)).
  93. |       The actual size of this structure depends on the size of
  94. |       the Value array.
  95. |
  96. ----------------------------------------------------------------------------*/
  97.  
  98. typedef struct {
  99.     unsigned short unused:13,  /* Earlier versions of DDE.H incorrectly */
  100.                              /* 12 unused bits.                       */
  101.          fRelease:1,
  102.          fReserved:2;
  103.     short    cfFormat;
  104.     BYTE     Value[1];  /* This member was named rgb[1] in previous */
  105.                             /* versions of DDE.H                        */
  106.  
  107. } DDEPOKE;
  108.  
  109. /*----------------------------------------------------------------------------
  110. The following typedef's were used in previous versions of the Windows SDK.
  111. They are still valid.  The above typedef's define exactly the same structures
  112. as those below.  The above typedef names are recommended, however, as they
  113. are more meaningful.
  114.  
  115. Note that the DDEPOKE structure typedef'ed in earlier versions of DDE.H did
  116. not correctly define the bit positions.
  117. ----------------------------------------------------------------------------*/
  118.  
  119. typedef struct {
  120.         unsigned short unused:13,
  121.                  fRelease:1,
  122.                  fDeferUpd:1,
  123.          fAckReq:1;
  124.     short     cfFormat;
  125. } DDELN;
  126.  
  127. typedef struct {
  128.     unsigned short unused:12,
  129.                  fAck:1,
  130.                  fRelease:1,
  131.                  fReserved:1,
  132.                  fAckReq:1;
  133.     short     cfFormat;
  134.     BYTE     rgb[1];
  135. } DDEUP;
  136.  
  137.  
  138. /*
  139.  * DDE SECURITY
  140.  */
  141.  
  142. BOOL
  143. WINAPI
  144. DdeSetQualityOfService(
  145.     HWND hwndClient,
  146.     CONST SECURITY_QUALITY_OF_SERVICE *pqosNew,
  147.     PSECURITY_QUALITY_OF_SERVICE pqosPrev);
  148.  
  149. BOOL
  150. WINAPI
  151. ImpersonateDdeClientWindow(
  152.     HWND hWndClient,
  153.     HWND hWndServer);
  154.  
  155. /*
  156.  * DDE message packing APIs
  157.  */
  158. LONG APIENTRY PackDDElParam(UINT msg, UINT uiLo, UINT uiHi);
  159. BOOL APIENTRY UnpackDDElParam(UINT msg, LONG lParam, PUINT puiLo, PUINT puiHi);
  160. BOOL APIENTRY FreeDDElParam(UINT msg, LONG lParam);
  161. LONG APIENTRY ReuseDDElParam(LONG lParam, UINT msgIn, UINT msgOut, UINT uiLo, UINT uiHi);
  162.  
  163. #ifdef __cplusplus
  164. }
  165. #endif
  166.  
  167. #endif // _DDEHEADER_INCLUDED_
  168.