IDirectDrawSurface2::ReleaseDC

HRESULT ReleaseDC(HDC hDC);

Releases the handle of a device context previously obtained by using the IDirectDrawSurface2::GetDC method.

·Returns DD_OK if successful, or one of the following error values otherwise:

DDERR_GENERIC

DDERR_INVALIDOBJECT

DDERR_INVALIDPARAMS

DDERR_SURFACELOST

DDERR_UNSUPPORTED

hDC

Handle of a device context previously obtained by IDirectDrawSurface2::GetDC.

This method also unlocks the surface previously locked when the IDirectDrawSurface2::GetDC method was called.