IDirectXFile::RegisterTemplates method
Registers custom templates. Deprecated.
Syntax
HRESULT RegisterTemplates(
[in] LPVOID pvData,
[in] DWORD cbSize
);
Parameters
-
pvData [in]
-
Type: LPVOID
Pointer to a buffer consisting of a DirectX file in text or binary format that contains templates.
-
cbSize [in]
-
Type: DWORD
Size of the buffer pointed to by pvData, in bytes.
Return value
Type: HRESULT
If the method succeeds, the return value is DXFILE_OK. If the method fails, the return value can be one of the following values: DXFILEERR_BADFILEFLOATSIZE, DXFILEERR_BADFILETYPE, DXFILEERR_BADFILEVERSION, DXFILEERR_BADVALUE, DXFILEERR_PARSEERROR.
Remarks
The following code fragment provides an example call to RegisterTemplates And example contents for the buffer to which pvData points.
TIDirectXFile * pDXFile;
char *szTemplates = "xof 0303txt 0032\
template SimpleData { \
<2b934580-9e9a-11cf-ab39-0020af71e433> \
DWORD item1;DWORD item2;DWORD item3;} \
template ArrayData { \
<2b934581-9e9a-11cf-ab39-0020af71e433> \
DWORD cItems; array DWORD aItem[2][cItems]; [...] } \
template RestrictedData { \
<2b934582-9e9a-11cf-ab39-0020af71e433> \
DWORD item; [SimpleData]}";
hr = pDXFile->RegisterTemplates(szTemplates, strlen(szTemplates));
All templates must specify a name and a Universally Unique Identifier (UUID).
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|
See also