| ?/TD> | 
| Microsoft DirectX 9.0 | 
Compile an effect.
Syntax
HRESULT CompileEffect(
DWORD Flags, LPD3DXBUFFER *ppEffect, LPD3DXBUFFER *ppErrorMsgs );
Parameters
- Flags
 - [in] Compile options. For more information, see D3DXSHADER.
 - ppEffect
 - [out, retval] Buffer containing the compiled effect. For more information about accessing the buffer, see ID3DXBuffer.
 - ppErrorMsgs
 - [out, retval] Buffer containing at least the first compile error message that occurred. This includes effect compiler errors and high-level language compile errors. For more information about accessing the buffer, see ID3DXBuffer.
 
Return Value
If the method succeeds, the return value is S_OK.
If the arguments are invalid, the method will return D3DERR_INVALIDCALL.
If the method fails, the return value will be E_FAIL.
See Also
High-Level Shader Language