Method Init
From AVObjects Knowledge Base
		(Difference between revisions)
		
		
| Line 3: | Line 3: | ||
Производит инициализацию данных объекта, для объектов - сплитеров или ридеров производит открытие файлов и начальный парсинг.  | Производит инициализацию данных объекта, для объектов - сплитеров или ридеров производит открытие файлов и начальный парсинг.  | ||
| − | == ==  | + | === ===  | 
<source lang=idl>HRESULT Init()</source>  | <source lang=idl>HRESULT Init()</source>  | ||
[[Category:IAVObject]]  | [[Category:IAVObject]]  | ||
| − | == Sample ==  | + | ===Returns:===  | 
| + | <pre>  | ||
| + | S_OK                                Converted data in pbDst returned  | ||
| + | S_FALSE                             Required data is not found  | ||
| + | HRESULT_FROM_WIN32(ERROR_MORE_DATA) Destination buffer is too small to receive the data  | ||
| + | E_POINTER                           One or more NULL pointer argument  | ||
| + | E_INVALIDARG                        One or more arguments are invalid  | ||
| + | E_FAIL                              Object not initialized yet or other failure.  | ||
| + | </pre>  | ||
| + | |||
| + | === Sample ===  | ||
<source lang=cpp>  | <source lang=cpp>  | ||
   //---------------------------------  |    //---------------------------------  | ||
Revision as of 13:05, 8 July 2014
This page is a copy of the original page on the AVObjects' web site and can also be viewed here.
Производит инициализацию данных объекта, для объектов - сплитеров или ридеров производит открытие файлов и начальный парсинг.
HRESULT Init()
Returns:
S_OK Converted data in pbDst returned S_FALSE Required data is not found HRESULT_FROM_WIN32(ERROR_MORE_DATA) Destination buffer is too small to receive the data E_POINTER One or more NULL pointer argument E_INVALIDARG One or more arguments are invalid E_FAIL Object not initialized yet or other failure.
Sample
//--------------------------------- // Create MXF Reader object CComPtr<IAVObject> spReader; HRESULT hr = Create_MXFReader(&spReader); if (hr != S_OK) return hr; //--------------------------------- // Set filename CComQIPtr<IAVProperties> spProps(spReader); ATLASSERT(spProps != NULL); hr = spProps->PropsSet(L"source", L"file.mxf"); if(hr != S_OK) return hr; //--------------------------------- // Init Object hr = spReader->Init(); if(hr != S_OK) return hr;