Dde.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:5k
源码类别:

模拟服务器

开发平台:

C/C++

  1. /*****************************************************************************
  2. *                                                                             *
  3. * dde.h -       Dynamic Data Exchange structures and definitions              *
  4. *                                                                             *
  5. * Copyright (c) 1993-1999, Microsoft Corp. All rights reserved       *
  6. *                                                                             *
  7. *****************************************************************************/
  8. #ifndef _DDEHEADER_INCLUDED_
  9. #define _DDEHEADER_INCLUDED_
  10. #if _MSC_VER > 1000
  11. #pragma once
  12. #endif
  13. #ifndef _WINDEF_
  14. #include <windef.h>
  15. #endif
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. // begin_r_dde
  20. /* DDE window messages */
  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. // end_r_dde
  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. typedef struct {
  42. #ifndef _MAC
  43.         unsigned short bAppReturnCode:8,
  44.                  reserved:6,
  45.                  fBusy:1,
  46.  fAck:1;
  47. #else
  48.         unsigned short usFlags;
  49. #endif
  50. } DDEACK;
  51. /*----------------------------------------------------------------------------
  52. |       DDEADVISE structure
  53. |
  54. | WM_DDE_ADVISE parameter structure for hOptions (LOWORD(lParam))
  55. |
  56. ----------------------------------------------------------------------------*/
  57. typedef struct {
  58. #ifndef _MAC
  59.         unsigned short reserved:14,
  60.                  fDeferUpd:1,
  61.  fAckReq:1;
  62. #else
  63.         unsigned short usFlags;
  64. #endif
  65. short     cfFormat;
  66. } DDEADVISE;
  67. /*----------------------------------------------------------------------------
  68. |       DDEDATA structure
  69. |
  70. |       WM_DDE_DATA parameter structure for hData (LOWORD(lParam)).
  71. |       The actual size of this structure depends on the size of
  72. |       the Value array.
  73. |
  74. ----------------------------------------------------------------------------*/
  75. typedef struct {
  76. #ifndef _MAC
  77. unsigned short unused:12,
  78.                  fResponse:1,
  79.                  fRelease:1,
  80.                  reserved:1,
  81.                  fAckReq:1;
  82. #else
  83. unsigned short usFlags;
  84. #endif
  85. short  cfFormat;
  86. BYTE  Value[1];
  87. } DDEDATA;
  88. /*----------------------------------------------------------------------------
  89. | DDEPOKE structure
  90. |
  91. | WM_DDE_POKE parameter structure for hData (LOWORD(lParam)).
  92. |       The actual size of this structure depends on the size of
  93. |       the Value array.
  94. |
  95. ----------------------------------------------------------------------------*/
  96. typedef struct {
  97. #ifndef _MAC
  98. unsigned short unused:13,  /* Earlier versions of DDE.H incorrectly */
  99.                              /* 12 unused bits.                       */
  100.  fRelease:1,
  101.  fReserved:2;
  102. #else
  103. unsigned short usFlags;
  104. #endif
  105. short    cfFormat;
  106. BYTE  Value[1];  /* This member was named rgb[1] in previous */
  107.                             /* versions of DDE.H                        */
  108. } DDEPOKE;
  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. Note that the DDEPOKE structure typedef'ed in earlier versions of DDE.H did
  115. not correctly define the bit positions.
  116. ----------------------------------------------------------------------------*/
  117. typedef struct {
  118. #ifndef _MAC
  119.         unsigned short unused:13,
  120.                  fRelease:1,
  121.                  fDeferUpd:1,
  122.  fAckReq:1;
  123. #else
  124. unsigned short usFlags;
  125. #endif
  126. short  cfFormat;
  127. } DDELN;
  128. typedef struct {
  129. #ifndef _MAC
  130. unsigned short unused:12,
  131.                  fAck:1,
  132.                  fRelease:1,
  133.                  fReserved:1,
  134.                  fAckReq:1;
  135. #else
  136. unsigned short usFlags;
  137. #endif
  138. short  cfFormat;
  139. BYTE  rgb[1];
  140. } DDEUP;
  141. /*
  142.  * DDE SECURITY
  143.  */
  144. BOOL
  145. WINAPI
  146. DdeSetQualityOfService(
  147.     HWND hwndClient,
  148.     CONST SECURITY_QUALITY_OF_SERVICE *pqosNew,
  149.     PSECURITY_QUALITY_OF_SERVICE pqosPrev);
  150. BOOL
  151. WINAPI
  152. ImpersonateDdeClientWindow(
  153.     HWND hWndClient,
  154.     HWND hWndServer);
  155. /*
  156.  * DDE message packing APIs
  157.  */
  158. LPARAM APIENTRY PackDDElParam(UINT msg, UINT_PTR uiLo, UINT_PTR uiHi);
  159. BOOL   APIENTRY UnpackDDElParam(UINT msg, LPARAM lParam, PUINT_PTR puiLo, PUINT_PTR puiHi);
  160. BOOL   APIENTRY FreeDDElParam(UINT msg, LPARAM lParam);
  161. LPARAM APIENTRY ReuseDDElParam(LPARAM lParam, UINT msgIn, UINT msgOut, UINT_PTR uiLo, UINT_PTR uiHi);
  162. #ifdef __cplusplus
  163. }
  164. #endif
  165. #endif // _DDEHEADER_INCLUDED_