MFORMATSLib Namespace > IMFWriter Interface : WriterOptionGetByIndex Method |
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 )
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 }