WriterOptionGetCount Method (IMFWriter)
option's type(format, audio or video codec)
number of available options
Gets a number of available options (number of available formats, audio or video codecs)
Syntax
Sub WriterOptionGetCount( _
   ByVal _eType As eMFWriterOption, _
   ByRef _pnCount As Integer _
) 
void WriterOptionGetCount( 
   eMFWriterOption _eType,
   out int _pnCount
)
procedure WriterOptionGetCount( 
    _eType: eMFWriterOption;
   Out  _pnCount: Integer
); 
void WriterOptionGetCount( 
   eMFWriterOption _eType,
   [PARAMFLAG::Out] int _pnCount
) 

Parameters

_eType
option's type(format, audio or video codec)
_pnCount
number of available options
Example

Here is example of how to fill a combobox with available formats:

int nCount;
m_objWriter.WriterOptionGetCount(eMFWriterOption.eMFWO_Format, out nCount); // get number of capturing formats (eMFWriterOption.eMFWO_Format)
for (int i = 0; i < nCount; i++)
{
    string myName, longName;
    m_objWriter.WriterOptionGetByIndex(eMFWriterOption.eMFWO_Format, i, out myName, out longName); // get short (ID) and long names of capturing format (eMFWriterOption.eMFWO_Format)
    formatcombo.Items.Add(longName); // add a format's name into combobox's list
}
See Also

Reference

IMFWriter Interface
IMFWriter Members