WriterOptionGetByIndex Method (IMFWriter)
option's type (format, video or audio codec)
option's index
short name (ID) of option (for example, 'mp4')
full name of the option (for example, 'MPEG-4 part 2 Video')
Gets a writer's option by its index. 
Syntax
Sub WriterOptionGetByIndex( _
   ByVal _eType As eMFWriterOption, _
   ByVal _nIndex As Integer, _
   ByRef _pbsShortName As String, _
   ByRef _pbsLongName As String _
) 
void WriterOptionGetByIndex( 
   eMFWriterOption _eType,
   int _nIndex,
   out string _pbsShortName,
   out string _pbsLongName
)
procedure WriterOptionGetByIndex( 
    _eType: eMFWriterOption;
    _nIndex: Integer;
   Out  _pbsShortName: String;
   Out  _pbsLongName: String
); 
void WriterOptionGetByIndex( 
   eMFWriterOption _eType,
   int _nIndex,
   [PARAMFLAG::Out] BSTR* _pbsShortName,
   [PARAMFLAG::Out] BSTR* _pbsLongName
) 

Parameters

_eType
option's type (format, video or audio codec)
_nIndex
option's index
_pbsShortName
short name (ID) of option (for example, 'mp4')
_pbsLongName
full name of the option (for example, 'MPEG-4 part 2 Video')
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