IDirectDrawSurface7::IsLost method

Determines whether the surface memory that is associated with a DirectDrawSurface object has been freed.

Syntax


HRESULT IsLost();

Parameters

This method has no parameters.

Return value

If the method succeeds, the return value is DD_OK because the memory has not been freed.

If it fails, the method can return one of the following error values:

  • DDERR_INVALIDOBJECT
  • DDERR_INVALIDPARAMS
  • DDERR_SURFACELOST

You can use this method to determine when you need 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 graphics adapter is changed or when an application receives exclusive access to the graphics adapter and frees all surface memory that is currently allocated on the graphics adapter.

You must use LoadLibrary to explicitly link to Ddraw.dll and then use GetProcAddress to access the IsLost method.

Requirements

Header

Ddraw.h

Library

Ddraw.dll

See also

IDirectDrawSurface7

 

 

Community Additions

ADD
Show:
© 2015 Microsoft