The IDirectDrawSurface3::IsLost method determines if the surface memory associated with a DirectDrawSurface object has been freed.
HRESULT IsLost();
Return Values
If the method succeeds, the return value is DD_OK because the memory has not been freed.
If the method fails, the return value may be one of the following error values:
DDERR_INVALIDOBJECT |
DDERR_INVALIDPARAMS |
DDERR_SURFACELOST |
You can use this method to reallocate surface memory. When a DirectDrawSurface object loses its surface memory, most methods return DDERR_SURFACELOST and perform no other action.
Remarks
Surfaces can lose their memory when the mode of the display card is changed, or when an application receives exclusive access to the display card and frees all of the surface memory currently allocated on the display card.
QuickInfo
Windows NT: Use version 5.0 or later.
Windows: Use Windows 95 or later. Available as a redistributable for Windows 95.
Windows CE: Unsupported.
Header: Declared in ddraw.h.
Import Library: Use ddraw.lib.
See Also