[This function is subject to change with each operating system revision. Instead, use the Microsoft DirectDraw and Microsoft Direct3DAPIs; these APIs insulate applications from such operating system changes, and hide many other difficulties involved in interacting directly with display drivers.]
Creates a device context (DC) for the specified surface.
- hSurface [in]
- puColorTable [in]
Pointer to an override color table for the returned DC.
If successful, this function returns a valid HDC; otherwise it returns NULL.
Only one DC is allowed per surface at any given time. Subsequent calls to NtGdiDdGetDC will fail until the previous DC is released.
Applications are advised to call IDirectDrawSurface7::GetDC instead, which provides the same functionality in a manner independent of the operating system.
Minimum supported client
|Windows 2000 Professional [desktop apps only]|
Minimum supported server
|Windows 2000 Server [desktop apps only]|
Build date: 11/26/2013