Share via


XFileManager.FromFile(String) Method (Microsoft.DirectX.Direct3D)

Creates an XFile object used to read a .x file.

Definition

Visual Basic Public Function FromFile( _
    ByVal filename As String _
) As XFile
C# public XFile FromFile(
    string filename
);
C++ public:
XFileFromFile(
    StringLeave Sitefilename
);
JScript public function FromFile(
    filename : String
) : XFile;

Parameters

filename System.String
The filename of the .x file to read.

Return Value

Microsoft.DirectX.Direct3D.XFile
A newly created XFile object to read the .x file.

Remarks

After using this method, use one of the XFile methods to retrieve a data object.

Exception GraphicsException.ErrorCode Cause
GraphicsException XFileErrorCodes.BadValue A variable is outside its expected range; typically returned when an object is invalid.
XFileErrorCodes.ParseError Data stream could not be parsed.