Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

D3DReflect function

Gets a pointer to a reflection interface.

Syntax

HRESULT WINAPI D3DReflect(
  in  LPCVOID pSrcData,
  in  SIZE_T SrcDataSize,
  in  REFIID pInterface,
  out void ppReflector
);

Parameters

pSrcData [in]

Type: LPCVOID

A pointer to source data as compiled HLSL code.

SrcDataSize [in]

Type: SIZE_T

Length of pSrcData.

pInterface [in]

Type: REFIID

The reference GUID of the COM interface to use. For example, IID_ID3D11ShaderReflection.

ppReflector [out]

Type: void**

A pointer to a reflection interface.

Return value

Type: HRESULT

Returns one of the Direct3D 11 return codes.

Remarks

Shader code contains metadata that can be inspected using the reflection APIs.

The following code illustrates retrieving a ID3D11ShaderReflection Interface from a shader.



pd3dDevice->CreatePixelShader( pPixelShaderBuffer->GetBufferPointer(),
                               pPixelShaderBuffer->GetBufferSize(), g_pPSClassLinkage, &g_pPixelShader );

ID3D11ShaderReflection* pReflector = NULL; 
D3DReflect( pPixelShaderBuffer->GetBufferPointer(), pPixelShaderBuffer->GetBufferSize(), 
            IID_ID3D11ShaderReflection, (void**) &pReflector);


Requirements

Header

D3Dcompiler.h

Library

D3dcompiler_47.lib

DLL

D3dcompiler_47.dll

See also

Functions

 

 

Show:
© 2017 Microsoft