Hi,
So the problem is when I want to use try catch statement on function level (a class method). vax underlines every class method as well as class member variables:
void CXSimApp::OnCreateDevice(LPDIRECT3DDEVICE9 pDevice )
try
{
if ( !m_ResManager.InsertResource(&m_hMesh, new CMeshResource(pDevice, ".\\\\mesh\\\\maluchz.x", CMeshResource::OPTIMIZE)) )
return;
if (m_model)
{
for (unsigned i = 0; i < m_numModels; ++i)
{
m_model.Release();
}
}
m_model = new CMeshInstance[m_numModels];
for (DWORD i = 0; i < m_numModels; ++i)
m_model.SetMesh(dynamic_cast<CMeshResource *>(m_ResManager.GetResource(m_hMesh))->GetMesh() );
m_camera.Set(D3DXVECTOR3(20.0f, 50.0f, -20.0f), D3DXVECTOR3(0.0f, 0.0f, 10.0f), D3DXVECTOR3(0.0f, 1.0f, 0.0f) );
m_timer.Start();
D3DXCreateFont(pDevice, 28, 12, 10, 0, FALSE, ANSI_CHARSET, OUT_TT_ONLY_PRECIS, DEFAULT_QUALITY,
DEFAULT_PITCH, TEXT("Times New Roman"), &m_pFont);
ZeroMemory(&m_textScreen, sizeof(m_textScreen));
m_textScreen.right = 250;
m_textScreen.bottom = 120;
}
catch (std::runtime_error &ex)
{
MessageBox(NULL, ex.what(), "OnCreateDevice() Exception", MB_OK);
};
Removing try keyword or enclosing the try catch statement with braces helps but ofcourse that's no solution.
version:
VA_X.dll file version 10.3.1555.0 built 2007.04.26