D3DX11GetImageInfoFromResource function
Note
The D3DX (D3DX 9, D3DX 10, and D3DX 11) utility library is deprecated for Windows 8 and is not supported for Windows Store apps.
Note
Instead of using this function, we recommend that you use resource functions, then use DirectXTex library (tools), LoadFromXXXMemory (where XXX is WIC, DDS, or TGA; WIC doesn't support DDS and TGA; D3DX 9 supported TGA as a common art source format for games).
Retrieves information about a given image in a resource.
Syntax
HRESULT D3DX11GetImageInfoFromResource(
_In_ HMODULE hSrcModule,
_In_ LPCTSTR pSrcResource,
_In_ ID3DX11ThreadPump *pPump,
_In_ D3DX11_IMAGE_INFO *pSrcInfo,
_Out_ HRESULT *pHResult
);
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.
-
pSrcResource [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 data type resolves to LPCSTR. See Remarks.
-
pPump [in]
-
Type: ID3DX11ThreadPump*
Optional thread pump that can be used to load the info asynchronously. Can be NULL. See ID3DX11ThreadPump Interface.
-
pSrcInfo [in]
-
Type: D3DX11_IMAGE_INFO*
Pointer to a D3DX11_IMAGE_INFO structure to be filled with the description of the data in the source file.
-
pHResult [out]
-
Type: HRESULT*
A pointer to the return value. May be NULL. If pPump is not NULL, then pHResult must be a valid memory location until the asynchronous execution completes.
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 D3DX11GetImageInfoFromResourceW. Otherwise, the function call resolves to D3DX11GetImageInfoFromResourceA because ANSI strings are being used.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|