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.

ID3D11ClassLinkage::GetClassInstance method

Gets the class-instance object that represents the specified HLSL class.

Syntax


HRESULT GetClassInstance(
  [in]  LPCSTR              pClassInstanceName,
  [in]  UINT                InstanceIndex,
  [out] ID3D11ClassInstance **ppInstance
);

Parameters

pClassInstanceName [in]

Type: LPCSTR

The name of a class for which to get the class instance.

InstanceIndex [in]

Type: UINT

The index of the class instance.

ppInstance [out]

Type: ID3D11ClassInstance**

The address of a pointer to an ID3D11ClassInstance interface to initialize.

Return value

Type: HRESULT

Returns S_OK if successful; otherwise, returns one of the Direct3D 11 Return Codes.

Remarks

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.

Windows Phone 8: This API is supported.

Requirements

Header

D3D11.h

Library

D3D11.lib

See also

ID3D11ClassLinkage
ID3D11ClassInstance

 

 

Show:
© 2017 Microsoft