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.

156 lines
4.2 KiB

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