a7.EngVar.d3d_lockable is read-only. To allow rendering into a target window this needs to be set to 1. I can try and add a set clause, but i haven't worked with unsafe code really.