Reads a file that is on disk into memory.
HRESULT D3DReadFileToBlob(
LPCWSTR pFileName,
ID3DBlob **ppContents
)
pFileName
Type: LPCWSTR
[in] A pointer to a constant null-terminated string that contains the name of the file to read into memory.
ppContents
Type: ID3DBlob **
[out] A pointer to a variable that receives a pointer to the ID3DBlob interface that contains information that D3DReadFileToBlob read from the pFileName file. You can use this ID3DBlob interface to access the file information and pass it to other compiler functions.
Type: HRESULT
Returns one of the Direct3D 11 return codes.
Note
The D3dcompiler_44.dll or later version of the file contains the D3DReadFileToBlob compiler function.
Header: Declared in d3dcompiler.h.
Library: Use d3d11.lib.