3 Protocol Details

In the Desktop Clipboard Protocol, a server allows a client to access a set of shared clipbooks. Implementations can simultaneously participate in both client and server roles to allow for two-way sharing of clipbooks. Implementations can represent the local clipboard as a clipbook shared by a server, so that client software can interact agnostically with the local clipboard and remote clipbooks.

In the following diagram, a client and server first negotiate a DDE conversation as described in sections 3.1.3 and 3.2.3.

Clipboard sharing session

Figure 2: Clipboard sharing session

The following messages are then transmitted:

  1. The client sends a CMD_INITSHARE (section message, directing the server to initialize its SharedClipbookData information.

  2. The client sends a DDE request with SZDDESYS_TOPIC as the topic and SZDDESYS_ITEM_TOPICS as the item (section

  3. The server sends a SHARE_LISTW (section message containing the set of shared clipbooks.

  4. Knowing the available clipbooks, the client sends a DDE request with "ClipbookName1" as the topic and "FormatList" as the item.

  5. The server sends a CLIPFORMAT_LISTW (section message containing the set of supported formats for the "ClipbookName1" clipbook.

  6. Knowing the supported clipboard formats, the client sends a DDE request with "ClipbookName1" as the topic and CF_METAFILEPICT as the item.

  7. The server sends a CLIPDATA_METAFILEPICT (section message containing the metafile information for the "ClipbookName1" clipbook. The client renders this information to the user.

In this exchange, the set of supported formats returned in step 5 includes CF_METAFILEPICT; but in step 6, the client can request any other clipboard format, using one of the ClipboardFormatName (section values that is supported in the set returned in step 5. The client can continue by requesting other formats.