3D3 renderer create crash


i have problem with D3D renderer. During creating 3d3 render program crash in this line

IDirect3D9_GetDeviceCaps(data->d3d, data->adapter, D3DDEVTYPE_HAL, &caps);

I have tested that with Visual studio 8, 10 and 12. In windows xp and windows 7. Where can be problem ?

Thanx for answer


Can you recomend me directx SDK version and runtime version ?