IDirectDrawSurface7::ReleaseDC method

Releases the handle of a device context that was previously obtained by using the IDirectDrawSurface7::GetDC method.

Syntax


HRESULT ReleaseDC(
  [in] HDC hDC
);

Parameters

hDC [in]

The handle of a device context that was previously obtained by IDirectDrawSurface7::GetDC.

Return value

If the method succeeds, the return value is DD_OK.

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

  • DDERR_GENERIC
  • DDERR_INVALIDOBJECT
  • DDERR_INVALIDPARAMS
  • DDERR_SURFACELOST
  • DDERR_UNSUPPORTED

Remarks

ReleaseDC also unlocks the surface that was previously locked when the IDirectDrawSurface7::GetDC method was called.

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

Requirements

Header

Ddraw.h

Library

Ddraw.lib

DLL

Ddraw.dll

See also

IDirectDrawSurface7

 

 

Show: