D3D10DisassembleEffect function (d3d10effect.h)

This function -- which disassembles a compiled effect into a text string that contains assembly instructions and register assignments -- has been deprecated. Instead, use D3DDisassemble10Effect.

Syntax

HRESULT D3D10DisassembleEffect(
  [in]  ID3D10Effect *pEffect,
  [in]  BOOL         EnableColorCode,
  [out] ID3D10Blob   **ppDisassembly
);

Parameters

[in] pEffect

Type: ID3D10Effect*

A pointer to an ID3D10Effect Interface, which contains the compiled effect.

[in] EnableColorCode

Type: BOOL

Include HTML tags in the output to color code the result.

[out] ppDisassembly

Type: ID3D10Blob**

A pointer to an ID3D10Blob Interface which contains the disassembled shader.

Return value

Type: HRESULT

Returns one of the following Direct3D 10 Return Codes.

Remarks

This returned text includes a header with the version of the HLSL compiler used to generate this object, comments describing the memory layout of the constant buffers used by the shader, input and output signatures, and resource binding points.

Here is an example of disassembling a compiled effect. The example assumes you start with a compiled effect (shown as l_pBlob_Effect which you can see in Compile an Effect (Direct3D 10)).


LPCSTR commentString = NULL;
ID3D10Blob* pIDisassembly = NULL;
char* pDisassembly = NULL;
if( pVSBuf )
{
    D3D10DisassembleEffect( (UINT*) l_pBlob_Effect->GetBufferPointer(),
        l_pBlob_Effect->GetBufferSize(), TRUE, commentString, &pIDisassembly );
    if( pIDisassembly )
    {
        FILE* pFile = fopen( "effect.htm", "w" );
        if( pFile)
        {
            fputs( (char*)pIDisassembly->GetBufferPointer(), pFile );
            fclose( pFile );
        }
    }
}

Requirements

Requirement Value
Target Platform Windows
Header d3d10effect.h
Library D3D10.lib
DLL D3D10.dll

See also

Effect Functions (Direct3D 10)