--- mstools/h/dde.h 2018/08/09 18:20:01 1.1 +++ mstools/h/dde.h 2018/08/09 18:21:04 1.1.1.3 @@ -1,3 +1,9 @@ +#ifndef _DDEHEADER_INCLUDED_ +#define _DDEHEADER_INCLUDED_ + +#ifndef _WINDEF_ +#include +#endif /* DDE window messages */ @@ -41,15 +47,15 @@ typedef struct { unsigned short reserved:14, fDeferUpd:1, fAckReq:1; - WORD cfFormat; + short cfFormat; } DDEADVISE; /*---------------------------------------------------------------------------- | DDEDATA structure | -| WM_DDE_DATA parameter structure for hData (LOWORD(lParam)). -| The actual size of this structure depends on the size of +| WM_DDE_DATA parameter structure for hData (LOWORD(lParam)). +| The actual size of this structure depends on the size of | the Value array. | ----------------------------------------------------------------------------*/ @@ -60,7 +66,7 @@ typedef struct { fRelease:1, reserved:1, fAckReq:1; - WORD cfFormat; + short cfFormat; BYTE Value[1]; } DDEDATA; @@ -68,8 +74,8 @@ typedef struct { /*---------------------------------------------------------------------------- | DDEPOKE structure | -| WM_DDE_POKE parameter structure for hData (LOWORD(lParam)). -| The actual size of this structure depends on the size of +| WM_DDE_POKE parameter structure for hData (LOWORD(lParam)). +| The actual size of this structure depends on the size of | the Value array. | ----------------------------------------------------------------------------*/ @@ -79,7 +85,7 @@ typedef struct { /* 12 unused bits. */ fRelease:1, fReserved:2; - WORD cfFormat; + short cfFormat; BYTE Value[1]; /* This member was named rgb[1] in previous */ /* versions of DDE.H */ @@ -100,7 +106,7 @@ typedef struct { fRelease:1, fDeferUpd:1, fAckReq:1; - WORD cfFormat; + short cfFormat; } DDELN; typedef struct { @@ -109,7 +115,7 @@ typedef struct { fRelease:1, fReserved:1, fAckReq:1; - WORD cfFormat; + short cfFormat; BYTE rgb[1]; } DDEUP; @@ -121,27 +127,13 @@ typedef struct { #define DDE_POKE 0x0004L #define DDE_REQUEST 0x0008L -/* - * DDE packing structures - */ -typedef struct tagDDEACKSTRUCT { - UINT wStatus; - UINT aItemORhCommands; -} DDEACKSTRUCT, *PDDEACKSTRUCT; - -typedef struct tagDDEADVISESTRUCT { - HANDLE hOptions; - UINT aItem; -} DDEADVISESTRUCT, *PDDEADVISESTRUCT; - -typedef struct tagDDEDATASTRUCT { - HANDLE hData; - UINT aItem; -} DDEDATASTRUCT, *PDDEDATASTRUCT; - -typedef struct tagDDEPOKESTRUCT { - HANDLE hData; - UINT aItem; -} DDEPOKESTRUCT, *PDDEPOKESTRUCT; +// +// DDE message packing APIs +// +LONG APIENTRY PackDDElParam(UINT msg, UINT uiLo, UINT uiHi); +BOOL APIENTRY UnpackDDElParam(UINT msg, LONG lParam, PUINT puiLo, PUINT puiHi); +BOOL APIENTRY FreeDDElParam(UINT msg, LONG lParam); +LONG APIENTRY ReuseDDElParam(LONG lParam, UINT msgIn, UINT msgOut, UINT uiLo, UINT uiHi); +#endif // _DDEHEADER_INCLUDED_