Use C-like API for D3DTexture