DirectX SDK

DirectDrawSurface7.ReleaseDC

The DirectDrawSurface7.ReleaseDC method releases the handle of a device context previously obtained by using the DirectDrawSurface7.GetDC method.

object.ReleaseDC(hdc As Long)

Parameters

object
Object expression that resolves to a DirectDrawSurface7 object.
hdc
Handle of a device context previously obtained by DirectDrawSurface7.GetDC.

Error Codes

If the method fails, it raises an error, and Err.Number can be set to one of the following values:

DDERR_GENERIC
DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_SURFACELOST
DDERR_UNSUPPORTED

Remarks

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

See Also

DirectDrawSurface7.GetDC