4 Protocol Examples

In this example, the server machine is sharing a clipboard entry called "ShareName" which contains "Sample Text" as its textual data.

  1. The client makes a SZDDESYS_ITEM_TOPICS request (section 2.2.1.2) of the server.

    The following is the hexadecimal representation of the SHARE_LISTA (section 2.2.2.3) data the server returns:

    Ee392277.image003(en-us,PROT.20).png

    • SharingStatus: (1 byte, offset 0x0000), 0x3F is STATUS_UPDATED.

    • ShareIdentifier: (0 bytes, offset 0x0001), empty value.

    • Tab delimiter: (1 byte, offset 0x0001), 0x09 as required.

    • SharingStatus: (1 byte, offset 0x0002), 0x24 is STATUS_SHARED.

    • ShareIdentifier: (9 bytes, offset 0x0003), "ShareName" in ASCII.

    • Null terminator: (1 byte, offset 0x000C), 0x00 as required.

  2. The client recognizes the "ShareName" share is shared and requests its supported clipboard formats with the "FormatList" DDE message.

    The following is the hexadecimal representation of the CLIPFORMAT_LISTA (section 2.2.2.7) data the server returns:

    Ee392277.image004(en-us,PROT.20).png

    • ClipFormatName: (13 bytes, offset 0x0000), "&Unicode Text" in ASCII.

    • Tab delimiter: (1 byte, offset 0x000D), 0x09 as required.

    • ClipFormatName: (0 bytes, offset 0x000E), empty value.

    • Tab delimiter: (1 byte, offset 0x000E), 0x09 as required.

    • ClipFormatName: (5 bytes, offset 0x000F), "&Text" in ASCII.

    • Tab delimiter: (1 byte, offset 0x0014), 0x09 as required.

    • ClipFormatName: (9 bytes, offset 0x0015), "&OEM Text" in ASCII.

    • Tab delimiter: (1 byte, offset 0x001E), 0x09 as required.

    • ClipFormatName: (16 bytes, offset 0x001F), "Clipbook Preview" in ASCII.

    • Null terminator: (1 byte, offset 0x002F), 0x00 as required.

  3. The client determines that Unicode text is its preferred format for consumption of the data, so it makes a request for CF_UNICODETEXT.

    The following is the hexadecimal representation of the CLIPDATA_OTHERFORMATS (section 2.2.3.6) data the server returns:

    Ee392277.image005(en-us,PROT.20).png

    • OtherFormatData: (20 bytes, offset 0x0000), "Sample Text" in Unicode characters.

    • Null terminator: (2 bytes, offset 0x0016), 0x0000 as required.

Show: