D3DXGetImageInfoFromResource function

Retrieves information about a given image in a resource.

Syntax


HRESULT D3DXGetImageInfoFromResource(
  _In_ HMODULE        hSrcModule,
  _In_ LPCTSTR        pSrcFile,
  _In_ D3DXIMAGE_INFO *pSrcInfo
);

Parameters

hSrcModule [in]

Type: HMODULE

Module where the resource is loaded. Set this parameter to NULL to specify the module associated with the image that the operating system used to create the current process.

pSrcFile [in]

Type: LPCTSTR

Pointer to a string that specifies the filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.

pSrcInfo [in]

Type: D3DXIMAGE_INFO*

Pointer to a D3DXIMAGE_INFO structure to be filled with the description of the data in the source file.

Return value

Type: HRESULT

If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be the following: D3DERR_INVALIDCALL

Remarks

The compiler setting also determines the function version. If Unicode is defined, the function call resolves to D3DXGetImageInfoFromResourceW. Otherwise, the function call resolves to D3DXGetImageInfoFromResourceA because ANSI strings are being used.

Requirements

Header

D3dx9tex.h

Library

D3dx9.lib

See also

Texture Functions in D3DX 9
D3DXGetImageInfoFromFile
D3DXGetImageInfoFromFileInMemory

 

 

Show: