Share via


XFileSaveData.AddDataReference(String,Guid) Method (Microsoft.DirectX.Direct3D)

Adds a data reference as a child of this XFileSaveData file data node. The data reference points to a file data object.

Definition

Visual Basic Public Sub AddDataReference( _
    ByVal name As String, _
    ByVal guidData As GuidLeave Site _
)
C# public void AddDataReference(
    string name,
    GuidLeave Site guidData
);
C++ public:
void AddDataReference(
    StringLeave Sitename,
    GuidLeave Site guidData
);
JScript public function AddDataReference(
    name : String,
    guidData : GuidLeave Site
);

Parameters

name System.String
The name of the data object to add by reference. Specify null if the data object does not have a name.
guidData System.Guid
The globally unique identifier (GUID) representing the data object to add by reference. If null, a reference will be added that points to the data object with the given name.

Remarks

The file data object being referenced must have either a name or a GUID. The file data object must also derive from a different parent XFileSaveData object.

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.
OutOfMemoryExceptionLeave Site N/A Microsoft Direct3D could not allocate sufficient memory to complete the call.