hi: I run a basic sample on smartphone device to play a wma file, but get a error.... Here is the code snippet: --------------------------------------------------------------------------------------------- IGraphBuilder *pGraphBuilder; IMediaControl *pMediaControl; HRESULT hr = CoInitialize(NULL); if(FAILED(hr)) { MessageBox(L"ERROR: failed to initialize COM library!!!"); return; } hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC, IID_IGraphBuilder, (void **) &pGraphBuilder); if(FAILED(hr)) { MessageBox(L"ERROR: failed to create Filter Graph Manager instance!!"); return; } pGraphBuilder->QueryInterface(IID_IMediaControl, (void **) &pMediaControl); hr = pGraphBuilder->RenderFile(L"\\test.wma", NULL); if(SUCCEEDED(hr)) { pMediaControl->Run(); MessageBox(L"click ok to end playback..."); } else MessageBox(L"ERROR: failed to run Filter Graph..."); pMediaControl->Release(); pGraphBuilder->Release(); CoUninitialize(); --------------------------------------------------------------------------------------------- I get a 0x80040216 (VFW_E_NOT_FOUND) error on RenderFile. The description of VFW_E_NOT_FOUND is "An object or name was not found". Could someone provide a clue?? Best Regards.
On 5 Apr 2006 23:57:42 -0700, Tony wrote: > hr = pGraphBuilder->RenderFile(L"\\test.wma", NULL); > --------------------------------------------------------------------------------------------- > I get a 0x80040216 (VFW_E_NOT_FOUND) error on RenderFile. The > description of VFW_E_NOT_FOUND is "An object or name was not found". This error suggests that the file was not found. I don't know what the convention is for file specs for SmartPhones probably better off asking in a wince group for that part. -- Please read this before replying: 1. Dshow & posting help: http://tmhare.mvps.org/help.htm 2. Trim & respond inline (please don't top post or snip everything) 3. Benefit others: follow up if you are helped or you found a solution