Gets the class-instance object that represents the specified HLSL class.
public:
HRESULT GetClassInstance(
LPCSTR pClassInstanceName,
UINT InstanceIndex,
ID3D11ClassInstance **ppInstance
)
pClassInstanceName
Type: LPCSTR
[in] The name of a class for which to get the class instance.
InstanceIndex
Type: UINT
[in] The index of the class instance.
ppInstance
Type: ID3D11ClassInstance **
[out] The address of a pointer to an ID3D11ClassInstance interface to initialize.
Type: HRESULT
Returns S_OK if successful; otherwise, returns one of the following Direct3D 11 return codes.
For more information about using the ID3D11ClassLinkage interface, see Dynamic Linking.
A class instance must have at least 1 data member in order to be available for the runtime to use with ID3D11ClassLinkage::GetClassInstance. Any instance with no members will be optimized out of a compiled shader blob as a zero-sized object. If you have a class with no data members, use ID3D11ClassLinkage::CreateClassInstance instead.
Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).
Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).