XFileSaveData.AddDataObject Method

Language:

Note: This documentation is preliminary and is subject to change.

Adds a data object as a child of the XFileSaveData file data node.

Definition

Visual Basic .NET Public Function AddDataObject( _
    ByVal guidTemplate As Guid, _
    ByVal name As String, _
    ByVal guidData As Guid, _
    ByVal data() As Byte _
) As XFileSaveData
C# public XFileSaveData AddDataObject(
    Guid guidTemplate,
    string name,
    Guid guidData,
    byte[] data
);
Managed C++ public: XFileSaveData* AddDataObject(
    Guid guidTemplate,
    String *name,
    Guid guidData,
    Byte data __gc[]
);
JScript .NET public function AddDataObject(
    guidTemplate : Guid,
    name : String,
    guidData : Guid,
    data : byte[]
) : XFileSaveData;

Parameters

guidTemplate System.Guid. The globally unique identifier (GUID) representing the data object's template.
name System.String. The name of the data object to add.
guidData System.Guid. A globally unique identifier (GUID) representing the data object. The data object must have been registered with XFileManager.RegisterTemplates or XFileManager.RegisterXFileTemplates. Specify null if the object does not have a globally unique identifier (GUID).
data System.Byte[]. A Byte Leave Site array representing the buffer containing all required data in the data object.

Return Value

Microsoft.DirectX.Direct3D.XFileSaveData . An XFileSaveData object representing the file data node to which the data object will be added.

Remarks

Exception GraphicsException.ErrorCode Cause
GraphicsException XFileErrorCodes.BadObject Data could not be read from or written to an object.
XFileErrorCodes.BadValue A variable is outside its expected range; typically returned when an object is invalid.
OutOfMemoryException Leave Site N/A Microsoft® Direct3D® could not allocate sufficient memory to complete the call.


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.