A user-implemented method for opening and reading the contents of a shader #include file.
HRESULT Open( [in] D3D10_INCLUDE_TYPE IncludeType, [in] LPCSTR pFileName, [in] LPCVOID pParentData, [out] LPCVOID *ppData, [in] UINT *pBytes );
The location of the #include file. See D3D10_INCLUDE_TYPE.
Name of the #include file.
Pointer to the container that includes the #include file. The compiler might pass NULL in pParentData. For more information, see the "Searching for Include Files" section in Compile an Effect (Direct3D 11).
Pointer to the returned buffer that contains the include directives. This pointer remains valid until ID3D10Include::Close is called.
Number of bytes returned in ppData.
The user-implemented method should return S_OK. If the callback fails when reading the #include file, the application programming interface (API) that caused the callback to be called will fail. This is one of the following:
- The high-level shader language (HLSL) shader will fail one of the D3D10CompileShader*** functions.
- The effect will fail one of the D3D10CreateEffect*** functions.
typedef interface ID3DInclude ID3D10Include;