Deployment Tools Foundation
GetDataSize Method (fieldName)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.WindowsInstaller ► Record ► GetDataSize(String)
Gets the length of a record field. The count does not include the terminating null.
![](collapse_all.gif)
![](collapse_all.gif)
- fieldName (String)
- Specifies the field to check.
![](collapse_all.gif)
The returned data size is 0 if the field is null, non-existent, or an internal object pointer. The method also returns 0 if the handle is not a valid Record handle.
If the data is in integer format, the property returns 2 or 4.
If the data is in string format, the property returns the character count (not including the NULL terminator).
If the data is in stream format, the property returns the byte count.
![](collapse_all.gif)
Exception | Condition |
---|---|
ArgumentOutOfRangeException | The field name does not match any
of the named fields in the Record. |