D3DXGetImageInfoFromResource

Retrieves information about a given image in a resource.

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

Parameters

hSrcModule
[in] 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] 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] Pointer to a D3DXIMAGE_INFO structure to be filled with the description of the data in the source file.

Return Values

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: Declared in D3dx9tex.h.

See Also

D3DXGetImageInfoFromFile, D3DXGetImageInfoFromFileInMemory