IDirect3DRMTexture2::InitFromResource2

Initializes a Direct3DRMTexture2 object from a specified resource.

HRESULT InitFromResource2(
HModule hModule,
LPCTSTR strName,
LPCTSTR strType
);

Parameters

hModule

Handle of the specified resource.

strName

The name of the resource to be used to initialize the texture.

strType

The type name of the resource used to initialize the texture. Textures can be stored in RT_BITMAP and RT_RCDATA resource types, or user-defined types. If the resource type is user-defined, this method passes the resource module handle, the resource name, and the resource type to the FindResource Win32 API.

Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible return codes, see Direct3D Retained-Mode Return Values.

Remarks

You must have created the IDirect3DRMTexture2 object to be initialized using the IDirect3DRM2::CreateTexture or IDirect3DRM2::CreateTextureFromSurface methods.

See Also

IDirect3DRMTexture2::InitFromFile, IDirect3DRMTexture2::InitFromImage, IDirect3DRMTexture2::InitFromSurface