Ejemplo n.º 1
0
 public HResult GetAllocatedString(Guid guidKey,
                                   out string ppwszValue,
                                   out int pcchLength)
 {
     return(m_Attribs.GetAllocatedString(guidKey,
                                         out ppwszValue, out pcchLength));
 }
        /// <summary>
        /// Retrieves a string associated with a key.
        /// </summary>
        /// <param name="attributes">A valid IMFAttributes instance.</param>
        /// <param name="guidKey">Guid that identifies which value to retrieve.</param>
        /// <param name="value">Receives the string.</param>
        /// <returns>If this function succeeds, it returns the S_OK member. Otherwise, it returns another HResult's member that describe the error.</returns>
        public static HResult GetAllocatedString(this IMFAttributes attributes, Guid guidKey, out string value)
        {
            if (attributes == null)
            {
                throw new ArgumentNullException("attributes");
            }

            int stringLength;

            return(attributes.GetAllocatedString(guidKey, out value, out stringLength));
        }