Example #1
0
        /// <summary>
        /// Gets the raw property value for a given property name.
        /// </summary>
        /// <param name="propName">The name of the property.</param>
        /// <param name="propValue">The binary representation of the property value.</param>
        /// <returns>Returns false if the property was not set or is not supported.  Returns true otherwise.</returns>
        public bool GetUpdateProperty(string propName, ref byte[] propValue)
        {
            if (m_updateHandle == -1)
            {
                throw new InvalidOperationException();
            }

            return(MFNativeUpdate.GetUpdateProperty(m_updateHandle, propName, ref propValue));
        }
Example #2
0
        /// <summary>
        /// Gets the update property given the property name.
        /// </summary>
        /// <param name="propName">The name of the property.</param>
        /// <param name="propValue">The returned property object.</param>
        /// <returns>Returns false if the property was not set or is not supported.  Returns true otherwise.</returns>
        public bool GetUpdateProperty(string propName, ref object propValue)
        {
            if (m_updateHandle == -1)
            {
                throw new InvalidOperationException();
            }

            byte[] ser = MFNativeUpdate.SerializeParameter(propValue);

            if (MFNativeUpdate.GetUpdateProperty(m_updateHandle, propName, ref ser))
            {
                return(MFNativeUpdate.DeserializeParameter(ser, propValue));
            }

            return(false);
        }