Microsoft DirectX 8.0

IXml2Dex Interface

Saves and loads Microsoft® DirectShow® Editing Services (DES) project files in Extensible Markup Language (XML). This interface also provides methods for reading and writing DirectShow graph (.grf) files.

Requirements

Requires Qedit.h.

Requires Internet Explorer 4.0 or later.

Methods in Vtable Order

IUnknown methodsDescription
QueryInterfaceRetrieves pointers to supported interfaces.
AddRefIncrements the reference count.
ReleaseDecrements the reference count.
IXml2Dex MethodsDescription
CreateGraphFromFileNot implemented.
WriteGrfFileWrites a filter graph to a file in .grf format.
WriteXMLFileTranslates a timeline to XML and writes the XML data to a file.
ReadXMLFileLoads an XML project file.
DeleteNot implemented.
WriteXMLPartNot implemented.
PasteXMLFileNot implemented.
CopyXMLNot implemented.
PasteXMLNot implemented.
ResetNot implemented.
ReadXMLNot implemented.
WriteXMLTranslates a timeline to an XML string.

IXml2Dex::CopyXML

IXml2Dex Interface

Not implemented.

Syntax

HRESULT CopyXML(
    IUnknown *pTimeline,
    double dStart,
    double dEnd
);

IXml2Dex::CreateGraphFromFile

IXml2Dex Interface

Not implemented.

Syntax

HRESULT CreateGraphFromFile(
    IUnknown **ppGraph,
    IUnknown *pTimeline,
    BSTR FileName
);

IXml2Dex::Delete

IXml2Dex Interface

Not implemented.

Syntax

HRESULT Delete(
    IUnknown *pTimeline,
    double dStart,
    double dEnd
);

IXml2Dex::PasteXML

IXml2Dex Interface

Not implemented.

Syntax

HRESULT PasteXML(
    IUnknown *pTimeline,
    double dStart
);

IXml2Dex::PasteXMLFile

IXml2Dex Interface

Not implemented.

Syntax

HRESULT PasteXMLFile(
    IUnknown *pTimeline,
    double dStart,
    BSTR FileName
);

IXml2Dex::ReadXML

IXml2Dex Interface

Not implemented.

Syntax

HRESULT ReadXML(
    IUnknown *pTimeline,
    IUnknown *pXML
);

IXml2Dex::ReadXMLFile

IXml2Dex Interface

Loads an XML project file. This method creates instances of all the objects expressed in the XML file and inserts them into the timeline, as well as applying any attributes given for the timeline, such as frame rate or default effect.

Syntax

HRESULT ReadXMLFile(
    IUnknown *pTimeline,
    BSTR XMLName
);

Parameters

pTimeline
Pointer to a timeline object's IUnknown interface.
XMLName
String that specifies the name of the file to load.

Return Value

Returns S_OK if successful. Otherwise, returns VFW_E_INVALID_FILE_FORMAT or another error code.

Remarks

This method does not clear existing objects from the timeline before it inserts the new objects defined in the XML file. If you need to refresh an existing timeline, call IAMTimeline::ClearAllGroups first.

IXml2Dex::Reset

IXml2Dex Interface

Not implemented.

Syntax

HRESULT Reset(void);

IXml2Dex::WriteGrfFile

IXml2Dex Interface

Writes a filter graph to a file in .grf format.

Syntax

HRESULT WriteGrfFile(
    IUnknown *pGraph,
    BSTR FileName
);

Parameters

pGraph
Pointer to the filter graph's IUnknown interface.
FileName
String that specifies the name of the file to write.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
E_FAILFailure.
E_INVALIDARGArgument is invalid.
S_OKSuccess.

This method can also return error codes generated by internal calls to the IStorage::CreateStream and IPersist::Save methods. For more information, see the Platform SDK.

IXml2Dex::WriteXML

IXml2Dex Interface

Translates a timeline to an XML string.

Syntax

HRESULT WriteXML(
    IUnknown *pTimeline,
    BSTR *pbstrXML
);

Parameters

pTimeline
Pointer to the timeline object's IUnknown interface.
pbstrXML
Pointer to a variable of type BSTR that receives the XML string describing the timeline.

Return Value

Returns S_OK if successful. If there is insufficient memory for the conversion, returns E_OUTOFMEMORY. Otherwise, returns another error code.

Remarks

The method allocates memory for the string. The application must call SysFreeString to free the memory.

IXml2Dex::WriteXMLFile

IXml2Dex Interface

Translates a timeline to XML and writes the XML data to a file.

Syntax

HRESULT WriteXMLFile(
    IUnknown *pTimeline,
    BSTR FileName
);

Parameters

pTimeline
Pointer to the timeline object's IUnknown interface.
FileName
String that specifies the name of the file to write.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
E_INVALIDARGArgument is invalid.
E_OUTOFMEMORYInsufficient memory.
S_OKSuccess.

Remarks

This method generates an XML file that represents all the components in the timeline.

IXml2Dex::WriteXMLPart

IXml2Dex Interface

Not implemented.

Syntax

HRESULT WriteXMLPart(
    IUnknown *pTimeline,
    double dStart,
    double dEnd,
    BSTR FileName
);