![]() |
![]() |
![]() |
Accesses the .x file data.
Syntax
HRESULT Lock(
SIZE_T *pSize, const VOID **ppData );
Parameters
- pSize
- [in] Pointer to the size of the .x file data.
- ppData
- [in] Address of a pointer to receive the ID3DXFileData file data object's interface pointer. See Remarks.
Return Value
If the method succeeds, the return value is S_OK.
If the method fails, the following value will be returned:
D3DXFERR_BADVALUE A variable is outside its expected range; typically returned when an object pointer is invalid.
Remarks
The ppData pointer is only valid during a ID3DXFileData::Lock ... ID3DXFileData::Unlock sequence. You can make multiple lock calls. However, you must ensure that the number of lock calls matches the number of unlock calls.
Because file data is not guaranteed to be aligned properly with byte boundaries, you should access ppData with UNALIGNED pointers.
Returned parameter values are not guaranteed to be valid due to possible file corruption; therefore, your code should verify the returned parameter values.