|Microsoft DirectX 9.0|
The GetDC method creates a GDI-compatible device context for the surface. It uses an internal version of the Lock method to lock the surface, and the surface will remain locked until ReleaseDC is called. See the description of the Lock method for more information on this behavior.
HRESULT GetDC( HDCFAR *lphDC );
Points to the device context returned.
|DD_OK||The method succeeded.|
|DDERR_INVALIDOBJECT||DirectDraw received a pointer that was an invalid DirectDraw object.|
|DDERR_INVALIDPARAMS||One or more of the input parameters is invalid.|
|DDERR_SURFACELOST||Access to this surface is being refused because the surface memory is gone. The DirectDrawSurface object representing this surface should have Restore called on it.|
|DDERR_WASSTILLDRAWING||Informs DirectDraw that the previous Blt which is transfering information to or from this Surface is incomplete.|
|DDERR_UNSUPPORTED||Action not supported.|