   D3d10 load effect failing, but no error info
  For some reason this has started to just fail, but not provide any debugging infomation:unsigned shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;#ifdef _DEBUGshaderFlags |= D3D10_SHADER_DEBUG;#endifhr = D3DX10CreateEffectFromResource(Module, MAKEINTRESOURCE(IDR_FX_PRIMITIVE), L"primitive.fx",NULL, NULL, "fx_4_0", shaderFlags, 0, device, NULL, NULL, &primEffect, NULL, NULL);if(FAILED(hr))throw WinError(L"Failed to load effect: primitive.fx",hr);...class WinError : public fllib::exception::Error{public:WinError(const std::wstring &msg, HRESULT error):Error(msg + L"\n\n"){wchar_t *formatted;FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,0, error, 0, (wchar_t*)&formatted, 1, 0);str += formatted;LocalFree(formatted);}};D3D10 sends nothing to the Visual Studio output window like it does normally, and my exception class just formats the hr as "Unspecified error"Hers the shader I was trying to load if it makes any diffrence:matrix Projection;struct VS_INPUT{    float4 Pos : SV_POSITION;};struct PS_INPUT{    float4 Pos : SV_POSITION;};float4 VS(VS_INPUT input){    PS_INPUT output = (PS_INPUT)0;    output.Pos = mul(input.Pos, Projection);    return output;}float4 PS(PS_INPUT input):SV_Target{    return float4(0.0f, 1.0f, 1.0f, 1.0f);}technique10 Render{    pass P0    {   SetVertexShader  (CompileShader(vs_4_0, VS()));   SetGeometryShader(NULL );   SetPixelShader   (CompileShader(ps_4_0, PS()));    }}
  Hey,there's a far less complicated way to recieve debug info for a shader than that fiendishly complex looking chuck of code, the following code is directx9, but will most likely work on 10 with some minor changes;LPD3DXBUFFER pBuffer;if(FAILED(D3DXCreateEffectFromFile(pd3dDevice, strEffectFilePath, NULL, NULL, dwShaderFlags, NULL, &m_pEffect, &pBuffer))){// if effect could not compile, output shader debug infoLPVOID pCompileErrors = pBuffer->GetBufferPointer();MessageBox(NULL, (const char*)pCompileErrors, "Compile Error", MB_OK|MB_ICONEXCLAMATION);PostQuitMessage(0);};  Yep, leet bix's technique is the recommended approach under D3D10 as well. You'll want to use ID3D10Blob* instead of LPD3DXBUFFER, and you'll want to be passing it in as the penultimate parameter to CreateEffectFromResource (after primEffect).   ;  Ok thanks, I didnt realise there was an extra output that contained error info for loading shaders, I thought the extra outputs were only for non blocking load calls with the new d3d10 threading stuff.   