# DX11 DX11 - Shader Reflection - Interface not supported

This topic is 2083 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi guys.

So I'm having a slight problem here, I've just started on the shader reflection as it might prove useful for me, but some obstacles came along the way, some were fixed, but not this one.

How I'm attempting it:

// Compile e.g. the Vertex Shader
D3DX11CompileFromFile(...)

// Set up the shader reflection
HRESULT hr =

if (FAILED(hr)) // I didn't directly just check the returned HR, because it's used later...
{
std::string error = std::string((std::string)"Shader Reflection Failed, Error:\n" + _com_error(hr).ErrorMessage()).c_str(); // Yeah, this is a bit ugly, but it works.
}

pReflector->GetDesc( &desc );


So what happens is that the HR fails, with the following error message: (Please keep in mind that the message was in another language, so this is just a rough translation):

This interface is not supported


So my questions are:

• What have I done wrong?
• (Bonus) Is there any way of setting the error messages to english?

I've stumbled across several threads, like this one:

http://xboxforums.create.msdn.com/forums/t/63358.aspx

But unfortunately I didn't get it to work.

-MIGI0027

##### Share on other sites

D3DX11CompileFromFile() is deprecated. Shader compilation functions are now part of D3D, not D3DX.

You should use D3DCompileFromFile() to compile you shaders, that should solve your issues.

Edited by N.I.B.

##### Share on other sites

Yes I'm using VS 2012 (v11), so that's most likely the issue, I'm going to try and copy the IID from the Dx headers. And I'll also adapt to the D3DCompileFromFile.

I'll post the results here as soon as I can.

Thank you.

-MIGI0027

##### Share on other sites

Ok, thanks guys, It seems like the problem has been fixed (For now!  )

Actually, this was partly my fault as well, it seems like I was linking against DX11Effects.lib, which had a different definition for D3DReflect, which only accepted the GUI for the effects, so removing this link fixed the issue (I'm not really sure why it was linked, as I never used it...)

Anyways, thanks for you help!

-MIGI0027

• 18
• 29
• 11
• 21
• 16