Microsoft DirectX 8.1 (Visual Basic)
Loading an X File
Use the following procedure to load an .x file.
Use the
DirectX8.DirectXFileCreate
method to create a
DirectXFile
object.
If templates are present in the Microsoft® DirectX® file that you will load, use the
DirectXFile.RegisterTemplates
method to register those templates.
Use the
DirectXFile.CreateEnumObject
method to create a
DirectXFileEnum
enumerator object.
Loop through the objects in the file. For each object, perform the following steps.
Use the
DirectXFileEnum.GetNextDataObject
method to retrieve each
DirectXFileData
object.
Use the
DirectXFileData.GetType
method to retrieve the data's type.
Load the data using the
DirectXFileData.GetData
method.
If the object has optional members, retrieve the optional members by calling the
DirectXFileData.GetNextObject
method.
Set the
DirectXFileData
object variable to Nothing.
Set the
DirectXFileEnum
object variable to Nothing.
Set the
DirectXFile
object variable to Nothing.