I'm creating D3D cursor, so first I made Surface & Texture. and doing this, I met error on GetSurfaceLevel() Function.
Unhandled exception at 0x5B494B11 0xC0000005: Access violation reading location 0x00000000.
code:
D3DXCreateTextureFromFile( g_D3dDevice, L"cursor1.bmp", &g_cursortex );
g_cursortex->GetSurfaceLevel( 0, &g_surfcursor );
g_D3dDevice->SetCursorProperties( 0, 0, g_surfcursor );
g_D3dDevice->ShowCursor( TRUE );
What should I do?