Applications supporting OLE with direct DDE use four clipboard formats in addition to the regular data and picture formats. These are ObjectLink, OwnerLink, Native, and Binary. Binary format is a stream of bytes whose interpretation is implicit in the item; for example, the EditEnvItems, StdTargetDevice, and StdHostNames items are in Binary format. The ObjectLink, OwnerLink, and Native formats are described in Section 6.2.5, “Clipboard Conventions.”
New items available on each topic other than the System topic are defined for this protocol. These items are the following:
Item | Description |
StdDocumentName | Contains the permanent document name associated with the topic. If no permanent storage is associated with the topic, this item is empty. This item supports both request and advise transactions and can be used to detect the renaming of open documents. |
EditEnvItems | Returns a list in tab-separated text format of the items that contain environmental information supported by the server for its documents. Currently defined items are StdHostNames, StdDocDimensions, and StdTargetDevice. Applications can declare other items (and define their interpretations if Binary format is used) to permit clients that are informed of these items to provide more detailed information. Servers that cannot use particular items should omit their names from the EditEnvItems item. Clients should use the WM_DDE_REQUEST message with this item to find out which items the server can use and should supply the data through a WM_DDE_POKE message. |
StdHostNames | Accepts information about the client application, in Binary format interpreted as the following structure: |
struct { WORD clientNameOffset; WORD documentNameOffset; BYTE data[]; } StdHostNames; | |
The offsets are relative to the start of the data array. They indicate the starting point for the appropriate information in the array. | |
StdTargetDevice | Accepts information about the target device that the client is using. This information is in Binary format, interpreted as the following structure. Offsets are relative to the start of the data array. |
typedef struct _OLETARGETDEVICE { WORD otdDeviceNameOffset; WORD otdDriverNameOffset; WORD otdPortNameOffset; WORD otdExtDevmodeOffset; WORD otdExtDevmodeSize; WORD otdEnvironmentOffset; WORD otdEnvironmentSize; BYTE otdData[]; } OLETARGETDEVICE; | |
StdDocDimensions | Accepts information about the size of a document. This information is in Binary format, interpreted as the following structure. These values are specified in MM_HIMETRIC units. |
struct { int iXContainer; int iYContainer; } StdDocDimensions; | |
StdColorScheme | Returns the colors that the server is currently using and accepts information about the colors that the client requests the server to use. This information is in Binary format, interpreted as a LOGPALETTE structure. |
null | Specifies a request or advise transaction on all data contained in the topic. This item is a zero-length item name. |
The update method used for advise transactions on items follows a convention
in which an update specifier is appended to the actual item name. The item is
encoded as follows:
itemname/update type
For backward compatibility, omitting the update type has the same result as specifying /Change. The update type placeholder may be filled with one of the following values:
Value | Meaning |
/Change | Notify for each change. |
/Close | Notify when document is closed. |
/Save | Notify when document is saved. |
DDE server applications are required to save each occurrence of a WM_DDE_ADVISE message that specifies a unique combination of
itemname, update type, format, and conversation. A notification is disabled
by a WM_DDE_UNADVISE message with corresponding parameters. If the WM_DDE_UNADVISE message does not specify a format, it disables the oldest notification in first in, first out (FIFO) rotation.