Minor issue: I don't think there's a reason to destroy and recreate the surface.
> + IDirectDrawSurface_Release(d3drm_ds);
> + IDirectDrawSurface_Release(d3drm_surface);
> + IDirectDrawSurface_Release(ds);
What happens to the depth buffer here? Does it remain attached?