Beispiel #1
0
        private int GetCount()
        {
            int count;

            Win32ComException.Try(GetCountInternal(out count), c, "GetCount");
            return(count);
        }
Beispiel #2
0
        private int GetCount()
        {
            int count;

            Win32ComException.Try(GetCountNative(out count), InterfaceName, "GetCount");
            return(count);
        }
Beispiel #3
0
        /// <summary>
        /// Gets data for a specific property.
        /// </summary>
        /// <param name="key">The <see cref="PropertyKey"/> of the property. The key can be obtained by calling the <see cref="GetKey"/> method.</param>
        /// <returns>The data of the specified property.</returns>
        public PropertyVariant GetValue(PropertyKey key)
        {
            PropertyVariant value;
            int             result = GetValueNative(key, out value);

            Win32ComException.Try(result, InterfaceName, "GetValue");
            return(value);
        }
Beispiel #4
0
        public PropertyKey GetKey(int index)
        {
            PropertyKey key;
            int         result = GetAtInternal(index, out key);

            Win32ComException.Try(result, c, "GetAt");
            return(key);
        }
Beispiel #5
0
        public PropertyVariant GetValue(PropertyKey key)
        {
            PropertyVariant value;
            int             result = GetValueInternal(key, out value);

            Win32ComException.Try(result, c, "GetValue");
            return(value);
        }
Beispiel #6
0
        /// <summary>
        /// Gets a property key from an item's array of properties.
        /// </summary>
        /// <param name="index">The zero-based index of the property key in the array of <see cref="PropertyKey"/> structures.</param>
        /// <returns>The <see cref="PropertyKey"/>.</returns>
        public PropertyKey GetKey(int index)
        {
            if (index >= Count)
            {
                throw new ArgumentOutOfRangeException("index");
            }

            PropertyKey key;
            int         result = GetAtNative(index, out key);

            Win32ComException.Try(result, InterfaceName, "GetAt");
            return(key);
        }
Beispiel #7
0
 /// <summary>
 ///     Saves a property change.
 /// </summary>
 /// <remarks>
 ///     For more information see
 ///     <see href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb761470%28v=vs.85%29.aspx" />.
 /// </remarks>
 public void Commit()
 {
     Win32ComException.Try(CommitNative(), InterfaceName, "Commit");
 }
Beispiel #8
0
        /// <summary>
        /// Sets a new property value, or replaces or removes an existing value.
        /// </summary>
        /// <param name="key">The <see cref="PropertyKey"/> of the property. The key can be obtained by calling the <see cref="GetKey"/> method.</param>
        /// <param name="value">The new property data.</param>
        public void SetValue(PropertyKey key, PropertyVariant value)
        {
            int result = SetValueNative(key, value);

            Win32ComException.Try(result, InterfaceName, "SetValue");
        }
Beispiel #9
0
        public void SetValue(PropertyKey key, PropertyVariant value)
        {
            int result = SetValueInternal(key, value);

            Win32ComException.Try(result, c, "SetValue");
        }