IDirectDrawSurface2::GetOverlayPosition

HRESULT GetOverlayPosition(LPLONG lplX, LPLONG lplY);

Given a visible, active overlay surface (DDSCAPS_OVERLAY flag set), this method returns the display coordinates of the surface.

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

DDERR_GENERIC

DDERR_INVALIDOBJECT

DDERR_INVALIDPARAMS

DDERR_INVALIDPOSITION

DDERR_NOOVERLAYDEST

DDERR_NOTAOVERLAYSURFACE

DDERR_OVERLAYNOTVISIBLE

DDERR_SURFACELOST

lplX and lplY

Addresses of the x- and y-display coordinates.