IDirectDrawSurface2::GetDDInterface
HRESULT GetDDInterface(LPVOID FAR *lplpDD);
Returns an interface to the DirectDraw object that was used to create the surface.
·Returns DD_OK if successful, or one of the following error values otherwise:
DDERR_INVALIDOBJECT DDERR_INVALIDPARAMS
lplpDD
Address of a pointer that will be filled with a valid DirectDraw pointer if the call succeeds.
To ensure COM compliance, this method is not part of the IDirectDrawSurface interface, but of the IDirectDrawSurface2 interface. To use this method, you must first query for the IDirectDrawSurface2 interface. For more information, see IDirectDrawSurface2 Interface.