Original Post
I get this runtime error when running my application that uses a Effects file (*.fx) in VS.Net. The error occurs when trying to access the effect g_pEffect->SetTechnique("TShader"); No problem to set up the effect, HRESULT hr = D3DXCreateEffectFromFileW( d3dDevice, EFFECTFILENAME, NULL, NULL, dwShaderFlags, NULL, &g_pEffect, NULL ); setting variables: g_pEffect->SetMatrix("matWorldViewProj", &ViewProjMatrix); but in the rendering loop the program halts at: g_pEffect->SetTechnique("TShader"); saying: "Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention." What is wrong here?