Restoring All Surfaces

The RestoreSurfaces function attempts to restore all the surfaces used by the application.

static LRESULT

RestoreSurfaces(void)

{

HRESULT hRes;

hRes = RestorePrimary();

if (FAILED(hRes))

return hRes;

hRes = RestoreDevice();

if (FAILED(hRes))

return hRes;

return DD_OK;

}