Windows error 32 (can't delete, move, rename...) after play file with DES



    Hello people,

    I have a problem when I try to access files:

    I build a timeline loading an xtl file, then a run the graph.

    When media is stopped, I release all resources (I think..)

    but when I try to modify some image files (need masks in timeline),

    I can't made any disk operation (save, delete, move...) on those files.

    Need upgrade DX? (I'm using DX8.1 with VC++6.0)

    Please help me.

    Alessandro Paperini

    Tuesday, September 05, 2006 9:45 AM

All replies

  • I have never used DX8, so I can't say for sure.  However, my first guess is that something isn't getting released.

    Are you using smart pointers for all you COM variables?

    Tuesday, September 05, 2006 4:34 PM
  • Yes, I do.

    The actions are very very simple:

    CComPtr< IAMTimeline >   pTL = NULL;
    CComPtr< IRenderEngine >     pRE = NULL;
    CComPtr< IXml2Dex >   pXML = NULL;
    CComPtr< IGraphBuilder >     pGB = NULL;
    CComPtr< IMediaControl >     pMC = NULL;
    CComPtr< IMediaEventEx >     pME = NULL;

    CoCreateInstance(CLSID_AMTimeline, NULL, CLSCTX_INPROC_SERVER, IID_IAMTimeline, (void**)&pTL);
    CoCreateInstance(CLSID_Xml2Dex, NULL, CLSCTX_INPROC_SERVER, IID_IXml2Dex, (void**)&pXML);
    CoCreateInstance(CLSID_RenderEngine, NULL, CLSCTX_INPROC_SERVER, IID_IRenderEngine, (void**)&pRE);

    pXML->ReadXMLFile(pTL, bstr);  //build timeline loading an .xtl file

    pRE->SetTimelineObject(pTL);  //sets the timeline for the render engine to use

    pRE->ConnectFrontEnd( );  //builds the front end of the filter graph


    pGB->QueryInterface(IID_IMediaControl, (void **)&pMC);
    pGB->QueryInterface(IID_IMediaEventEx, (void **)&pME);

    pMC->Run();  //run the graph

    long evCode;
    pME->WaitForCompletion(INFINITE, &evCode);



    pMC = NULL;
    pME = NULL;
    pGB = NULL;
    pRE = NULL;
    pXML = NULL;
    pTL = NULL;


    That's all;

    the resources involved (avi, bitmaps..) are unlocked only after application exit.

    Where is my mistake?

    Thanks in advance.

    Wednesday, September 06, 2006 1:47 PM