- *texture = (ID3D10Resource *)texture_2d;
I wonder if that is supposed to be set to NULL on failure. Can you please add a test for that?
OK, I'll add more test for that.
- if (hr != S_OK)
return E_FAIL;
- return S_OK;
Is this necessary? As opposed to a simple "return hr;".
The tests show that D3DX10CreateTextureFromMemory will always return E_FAIL on failure. See: https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/d3dx10_43/tests/d3dx1...