Share via


XFileManager.RegisterTemplates(Byte[]) Method (Microsoft.DirectX.Direct3D)

Registers custom templates.

Definition

Visual Basic Public Sub RegisterTemplates( _
    ByVal data() As Byte _
)
C# public void RegisterTemplates(
    byte[] data
);
C++ public:
void RegisterTemplates(
    array<unsigned char>^ data
);
JScript public function RegisterTemplates(
    data : byte[]
);

Parameters

data System.Byte[]
Array of ByteLeave Site values that contain the templates.

Remarks

The data parameter takes either a buffer that holds a compiled binary XFile, or a string that defines an XFile template, converted into an array of bytes. To convert a string into a byte array, use the GetBytes function, as in the following example, using stringVar as the string:

byte[] stringData = System.Text.Encoding.ASCII.GetBytes(stringVar);

The object should be disposed immediately when it is no longer needed.

Exceptions

GraphicsException