ID3D11ClassInstance::GetDesc method

Gets a description of the current HLSL class.


void GetDesc(




A pointer to a D3D11_CLASS_INSTANCE_DESC structure that describes the current HLSL class.

Return Value

This method does not return a value.


For more information about using the ID3D11ClassInstance interface, see Dynamic Linking.

An instance is not restricted to being used for a single type in a single shader. An instance is flexible and can be used for any shader that used the same type name or instance name when the instance was generated.

  • A created instance will work for any shader that contains a type of the same type name. For instance, a class instance created with the type name DefaultShader would work in any shader that contained a type DefaultShadereven though several shaders could describe a different type.
  • A gotten instance maps directly to an instance name/index in a shader. A class instance aquired using GetClassInstance will work for any shader that contains a class instance of the name used to generate the runtime instance, the instance does not have to be the same type in all of the shaders it's used in.
An instance does not replace the importance of reflection for a particular shader since a gotten instance will not know its slot location and a created instance only specifies a type name.

Windows Phone 8: This API is supported.


Target Platform Windows
Header d3d11.h
Library D3d11.lib

See Also