IReplicaKeyMap::Serialize
Serializes the replica key map data to a byte array.
The serialized replica key map that is contained in pbReplicaKeyMap is stored in compact form, in big-endian byte order.
The serialized replica key map contains the following elements, in the following order:
Data type | Length in bytes | Description |
|---|---|---|
ULONG | 4 | The replica key map signature. This value is always 5. |
BOOL | 1 | Indicates whether replica IDs that are contained in the replica key map are fixed length or variable length. This value is 0 if the IDs are fixed length; or 1 if the IDs are variable length. |
USHORT | 2 | The length, in bytes, of replica IDs for fixed-length IDs, or the maximum length of the ID for variable-length IDs. |
ULONG | 4 | The number of entries in the replica key map. |
The replica key map section contains a list of replica key map entries, with the number of entries equal to the value contained in the previous ULONG.
When replica IDs are fixed length:
Data type | Length in bytes | Description |
|---|---|---|
Sequence of bytes | The length specified in the replica ID format. | The fixed-length replica ID. |
Or, when replica IDs are variable length:
Data type | Length in bytes | Description |
|---|---|---|
USHORT | 2 | The length, in bytes, of the variable-length ID. This length includes the two bytes for the USHORT that contains the length, plus the bytes that contain the actual ID. |
Sequence of bytes | The length specified in the previous USHORT. | The variable-length replica ID. |