GetDataSize Method (field)

Microsoft Deployment Tools

Deployment Tools Foundation GetDataSize Method (field)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerRecordGetDataSize(Int32)
Gets the length of a record field. The count does not include the terminating null.
Declaration Syntax
C# Visual Basic Visual C++
public int GetDataSize(
	int field
)
Public Function GetDataSize ( _
	field As Integer _
) As Integer
public:
int GetDataSize(
	int field
)
Parameters
field (Int32)
Remarks

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.

Win32 MSI API: MsiRecordDataSize

Exceptions
Exception Condition
ArgumentOutOfRangeException The field is less than 0 or greater than the number of fields in the Record.

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller) Version: 3.0.0.0 (3.5.1623.0)