2.2.6.46 VARSTRING
The VARSTRING packet is used for returning variably sized strings. It is used both by the line device class and the phone device class.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dwTotalSize |
|||||||||||||||||||||||||||||||
dwNeededSize |
|||||||||||||||||||||||||||||||
dwUsedSize |
|||||||||||||||||||||||||||||||
dwStringFormat |
|||||||||||||||||||||||||||||||
dwStringSize |
|||||||||||||||||||||||||||||||
dwStringOffset |
|||||||||||||||||||||||||||||||
VarData (variable) |
|||||||||||||||||||||||||||||||
... |
dwTotalSize (4 bytes): The total size, in bytes, allocated to this packet.
dwNeededSize (4 bytes): The size, in bytes, for this packet that is needed to hold all the returned information.
dwUsedSize (4 bytes): The size, in bytes, of the portion of this packet that contains useful information.
dwStringFormat (4 bytes): The format of the string. This member uses one of the STRINGFORMAT_Constants.
dwStringSize (4 bytes): The size, in bytes, of the string information, including the null terminator.
dwStringOffset (4 bytes): The offset, from the beginning of the packet to the variably sized device field containing the string information. The size of the field is specified by dwStringSize.
VarData (variable): The string information, as specified by dwStringOffset. The encoding of the string is specified by dwStringFormat.
This packet is not extendible.
If a string cannot be returned in a variable packet, the dwStringSize and dwStringOffset fields are set in one of the following ways:
dwStringSize and dwStringOffset members are both set to 0.
dwStringOffset is nonzero and dwStringSize is 0.
dwStringOffset is nonzero, dwStringSize is 1, and the byte at the given offset is 0.