WS_XML_DICTIONARY structure (webservices.h)

Represents a set of unique strings. This information is used by the binary encoding to write a more compact xml document.


typedef struct _WS_XML_DICTIONARY {
  GUID          guid;
  WS_XML_STRING *strings;
  ULONG         stringCount;
  BOOL          isConst;



A guid that uniquely identifies the set of strings represented by the dictionary. The guid is never transmitted or persisted, and needs to only be unique for the lifetime of the process.


The set of unique strings that comprise the dictionary.


Specifies the number of strings in the dictionary.


Indicates if the dictionary and its contents are declared const and that they will be kept valid for the entire lifetime of any object with which strings in the dictionary are used.

If this is TRUE, then the strings can be manipulated more efficiently.


All strings and values within a dictionary must be unique. Dictionaries are always assumed to be well-formed, so it is up to the creator of the dictionary to ensure that this is the case.

A dictionary might be declared as:

struct PurchaseOrderDictionary
    WS_XML_DICTIONARY dictionary;
    WS_XML_STRING quantity;
    WS_XML_STRING productName;
    WS_XML_STRING purchaseOrder;
    WS_XML_STRING purchaseOrderNamespace;

static PurchaseOrderDictionary purchaseOrderDictionary =
        { /* A unique GUID generated from uuidgen */ },
    WS_XML_STRING_DICTIONARY_VALUE("Quantity",           &purchaseOrderDictionary.dictionary, 0),
    WS_XML_STRING_DICTIONARY_VALUE("ProductName",        &purchaseOrderDictionary.dictionary, 1),
    WS_XML_STRING_DICTIONARY_VALUE("PurchaseOrder",      &purchaseOrderDictionary.dictionary, 2),
    WS_XML_STRING_DICTIONARY_VALUE("", &purchaseOrderDictionary.dictionary, 3),

Strings from the dictionary might be used as:

WsWriteStartElement(xmlWriter, NULL, &purchaseOrderDictionary.purchaseOrder, &purchaseOrderDictionary.purchaseOrderNamespace, error);


Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Header webservices.h