Microsoft KB Archive/313844

= INFO: The RenderFile Method Does Not Work for GraphEdit (.grf) Files =

Article ID: 313844

Article Last Modified on 7/11/2005

-

APPLIES TO


 * Microsoft Platform Software Development Kit-January 2000 Edition

-



This article was previously published under Q313844



SUMMARY
If you use the IGraphBuilder::RenderFile method to open a GraphEdit (.grf) file, error 0x80040265 may be returned.



MORE INFORMATION
Starting with Microsoft DirectX version 8.1, programs cannot use the IGraphBuilder::RenderFile method to open .grf files. This change was made because of program interoperability issues.

You can open GraphEdit files by using the GraphEdit utility, or by using the IStream interface. The following sample code demonstrates how to use the IStream interface: HRESULT LoadGraphFile(IGraphBuilder *pGraph, const WCHAR* wszName) {   IStorage *pStorage = 0;

if (S_OK != StgIsStorageFile(wszName)) {       return E_FAIL; }

HRESULT hr = StgOpenStorage(wszName, 0,        STGM_TRANSACTED | STGM_READ | STGM_SHARE_DENY_WRITE, 0, 0, &pStorage);

if (FAILED(hr)) {       return hr; }

IPersistStream *pPersistStream = 0; hr = pGraph->QueryInterface(IID_IPersistStream, reinterpret_cast(&pPersistStream));

if (SUCCEEDED(hr)) {       IStream *pStream = 0; pStorage->OpenStream(L&quot;ActiveMovieGraph&quot;, 0,            STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &pStream);

if(SUCCEEDED(hr)) {           hr = pPersistStream->Load(pStream); pStream->Release; }       pPersistStream->Release; }   pStorage->Release; return hr; } Note that .grf files are meant for testing and debugging. They are not meant for end-user programs.

Additional query words: DirectShow GraphEdt

Keywords: kbinfo kbdswmm2003swept KB313844

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.