Example #1
0
 /// <summary>
 /// Gets the length of a record field. The count does not include the terminating null.
 /// </summary>
 /// <exception cref="ArgumentOutOfRangeException">The field is less than 0 or greater than the
 /// number of fields in the Record.</exception>
 /// <remarks><p>
 /// 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.
 /// </p><p>
 /// If the data is in integer format, the property returns 2 or 4.
 /// </p><p>
 /// If the data is in string format, the property returns the character count
 /// (not including the NULL terminator).
 /// </p><p>
 /// If the data is in stream format, the property returns the byte count.
 /// </p><p>
 /// Win32 MSI API:
 /// <a href="http://msdn.microsoft.com/library/en-us/msi/setup/msirecorddatasize.asp">MsiRecordDataSize</a>
 /// </p></remarks>
 public int GetDataSize(int field)
 {
     this.CheckRange(field);
     return((int)RemotableNativeMethods.MsiRecordDataSize((int)this.Handle, (uint)field));
 }