Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

163 lines
4.8 KiB

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