I have used dynamic textures. LockRect does not wait with dynamic textures.
HRESULT local_handle_result = S_OK;
CComPtr<IDirect3DTexture9> local_source_texture;
local_handle_result = direct_3D_device->CreateTexture(
cxImage,
cyImage,
1,
D3DUSAGE_DYNAMIC,
D3DFMT_A8R8G8B8,
D3DPOOL_DEFAULT,
&local_source_texture,
NULL);
if(local_handle_result!=D3D_OK)
{
return local_handle_result;
}
if(local_source_texture==NULL)
{
return local_handle_result;
}