Share via


DirectDraw Return Values

Errors are represented by negative values and cannot be combined. This table lists the values that can be returned by all methods of the IDirectDraw4, IDirectDrawSurface5, IDirectDrawPalette, IDirectDrawClipper, IDDVideoPortContainer, and IDirectDrawVideoPort interfaces. For a list of the error codes that each method can return, see the method description.

Return code Description
DD_OK The request completed successfully.
DDERR_ALREADYINITIALIZED The object has already been initialized.
DDERR_BLTFASTCANTCLIP A DirectDrawClipper object is attached to a source surface that has passed into a call to the IDirectDrawSurface5::BltFast method.
DDERR_CANNOTATTACHSURFACE A surface cannot be attached to another requested surface.
DDERR_CANNOTDETACHSURFACE A surface cannot be detached from another requested surface.
DDERR_CANTCREATEDC Windows cannot create any more device contexts (DCs), or a DC was requested for a palette-indexed surface when the surface had no palette and the display mode was not palette-indexed (that is, DirectDraw cannot select a proper palette into the DC).
DDERR_CANTDUPLICATE Primary and 3-D surfaces, or surfaces that are implicitly created, cannot be duplicated.
DDERR_CANTLOCKSURFACE Access to this surface is refused because an attempt was made to lock the primary surface without DCI support.
DDERR_CANTPAGELOCK An attempt to page lock a surface failed. Page lock will not work on a display-memory surface or an emulated primary surface.
DDERR_CANTPAGEUNLOCK An attempt to page unlock a surface failed. Page unlock will not work on a display-memory surface or an emulated primary surface.
DDERR_CLIPPERISUSINGHWND An attempt was made to set a clip list for a DirectDrawClipper object that is already monitoring a window handle.
DDERR_COLORKEYNOTSET No source color key is specified for this operation.
DDERR_CURRENTLYNOTAVAIL No support is currently available.
DDERR_DCALREADYCREATED A device context (DC) has already been returned for this surface. Only one DC can be retrieved for each surface.
DDERR_DEVICEDOESNTOWNSURFACE Surfaces created by one DirectDraw device cannot be used directly by another DirectDraw device.
DDERR_DIRECTDRAWALREADYCREATED A DirectDraw object representing this driver has already been created for this process.
DDERR_EXCEPTION An exception was encountered while performing the requested operation.
DDERR_EXCLUSIVEMODEALREADYSET An attempt was made to set the cooperative level when it was already set to exclusive.
DDERR_EXPIRED The data has expired and is no longer valid.
DDERR_GENERIC There is an undefined error condition.
DDERR_HEIGHTALIGN The height of the provided rectangle is not a multiple of the required alignment.
DDERR_HWNDALREADYSET The DirectDraw cooperative level window handle has already been set. It cannot be reset while the process has surfaces or palettes created.
DDERR_HWNDSUBCLASSED DirectDraw is prevented from restoring the state because the DirectDraw cooperative level window handle has been subclassed.
DDERR_IMPLICITLYCREATED The surface cannot be restored because it is an implicitly created surface.
DDERR_INCOMPATIBLEPRIMARY The primary surface creation request does not match the existing primary surface.
DDERR_INVALIDCAPS One or more of the capability bits passed to the callback function are incorrect.
DDERR_INVALIDCLIPLIST DirectDraw does not support the provided clip list.
DDERR_INVALIDDIRECTDRAWGUID The globally unique identifier (GUID) passed to the DirectDrawCreate function is not a valid DirectDraw driver identifier.
DDERR_INVALIDMODE DirectDraw does not support the requested mode.
DDERR_INVALIDOBJECT DirectDraw received a pointer that was an invalid DirectDraw object.
DDERR_INVALIDPARAMS One or more of the parameters passed to the method are incorrect.
DDERR_INVALIDPIXELFORMAT The pixel format was invalid as specified.
DDERR_INVALIDPOSITION The position of the overlay on the destination is no longer valid.
DDERR_INVALIDRECT The provided rectangle was invalid.
DDERR_INVALIDSTREAM The specified stream contains invalid data.
DDERR_INVALIDSURFACETYPE The requested operation could not be performed because the surface was of the wrong type.
DDERR_LOCKEDSURFACES One or more surfaces are locked, causing the failure of the requested operation.
DDERR_MOREDATA There is more data available than the specified buffer size can hold.
DDERR_NO3D No 3-D hardware or emulation is present.
DDERR_NOALPHAHW No alpha acceleration hardware is present or available, causing the failure of the requested operation.
DDERR_NOBLTHW No blitter hardware is present.
DDERR_NOCLIPLIST No clip list is available.
DDERR_NOCLIPPERATTACHED No DirectDrawClipper object is attached to the surface object.
DDERR_NOCOLORCONVHW The operation cannot be carried out because no color-conversion hardware is present or available.
DDERR_NOCOLORKEY The surface does not currently have a color key.
DDERR_NOCOLORKEYHW The operation cannot be carried out because there is no hardware support for the destination color key.
DDERR_NOCOOPERATIVELEVELSET A create function is called without the IDirectDraw4::SetCooperativeLevel method being called.
DDERR_NODC No DC has been created for this surface.
DDERR_NODDROPSHW No DirectDraw raster operation (ROP) hardware is available.
DDERR_NODIRECTDRAWHW Hardware-only DirectDraw object creation is not possible; the driver does not support any hardware.
DDERR_NODIRECTDRAWSUPPORT DirectDraw support is not possible with the current display driver.
DDERR_NOEMULATION Software emulation is not available.
DDERR_NOEXCLUSIVEMODE The operation requires the application to have exclusive mode, but the application does not have exclusive mode.
DDERR_NOFLIPHW Flipping visible surfaces is not supported.
DDERR_NOFOCUSWINDOW An attempt was made to create or set a device window without first setting the focus window.
DDERR_NOGDI No GDI is present.
DDERR_NOHWND Clipper notification requires a window handle, or no window handle has been previously set as the cooperative level window handle.
DDERR_NOMIPMAPHW The operation cannot be carried out because no mipmap capable texture mapping hardware is present or available.
DDERR_NOMIRRORHW The operation cannot be carried out because no mirroring hardware is present or available.
DDERR_NONONLOCALVIDMEM An attempt was made to allocate non-local video memory from a device that does not support non-local video memory.
DDERR_NOOPTIMIZEHW The device does not support optimized surfaces.
DDERR_NOOVERLAYDEST The IDirectDrawSurface5::GetOverlayPosition method is called on an overlay but the IDirectDrawSurface5::UpdateOverlay method has not been called on to establish a destination.
DDERR_NOOVERLAYHW The operation cannot be carried out because no overlay hardware is present or available.
DDERR_NOPALETTEATTACHED No palette object is attached to this surface.
DDERR_NOPALETTEHW There is no hardware support for 16- or 256-color palettes.
DDERR_NORASTEROPHW The operation cannot be carried out because no appropriate raster operation hardware is present or available.
DDERR_NOROTATIONHW The operation cannot be carried out because no rotation hardware is present or available.
DDERR_NOSTRETCHHW The operation cannot be carried out because there is no hardware support for stretching.
DDERR_NOT4BITCOLOR The DirectDrawSurface object is not using a 4-bit color palette and the requested operation requires a 4-bit color palette.
DDERR_NOT4BITCOLORINDEX The DirectDrawSurface object is not using a 4-bit color index palette and the requested operation requires a 4-bit color index palette.
DDERR_NOT8BITCOLOR The DirectDrawSurface object is not using an 8-bit color palette and the requested operation requires an 8-bit color palette.
DDERR_NOTAOVERLAYSURFACE An overlay component is called for a non-overlay surface.
DDERR_NOTEXTUREHW The operation cannot be carried out because no texture-mapping hardware is present or available.
DDERR_NOTFLIPPABLE An attempt has been made to flip a surface that cannot be flipped.
DDERR_NOTFOUND The requested item was not found.
DDERR_NOTINITIALIZED An attempt was made to call an interface method of a DirectDraw object before the object was initialized.
DDERR_NOTLOADED The surface is an optimized surface, but it has not yet been allocated any memory.
DDERR_NOTLOCKED An attempt is made to unlock a surface that was not locked.
DDERR_NOTPAGELOCKED An attempt is made to page unlock a surface with no outstanding page locks.
DDERR_NOTPALETTIZED The surface being used is not a palette-based surface.
DDERR_NOVSYNCHW The operation cannot be carried out because there is no hardware support for vertical blank synchronized operations.
DDERR_NOZBUFFERHW The operation to create a Z-buffer in display memory or to perform a blit using a Z-buffer cannot be carried out because there is no hardware support for Z-buffers.
DDERR_NOZOVERLAYHW The overlay surfaces cannot be Z-layered based on the Z-order because the hardware does not support Z-ordering of overlays.
DDERR_OUTOFCAPS The hardware needed for the requested operation has already been allocated.
DDERR_OUTOFMEMORY DirectDraw does not have enough memory to perform the operation.
DDERR_OUTOFVIDEOMEMORY DirectDraw does not have enough display memory to perform the operation.
DDERR_OVERLAPPINGRECTS Operation could not be carried out because the source and destination rectangles are on the same surface and overlap each other.
DDERR_OVERLAYCANTCLIP The hardware does not support clipped overlays.
DDERR_OVERLAYCOLORKEYONLYONEACTIVE An attempt was made to have more than one color key active on an overlay.
DDERR_OVERLAYNOTVISIBLE The IDirectDrawSurface5::GetOverlayPosition method is called on a hidden overlay.
DDERR_PALETTEBUSY Access to this palette is refused because the palette is locked by another thread.
DDERR_PRIMARYSURFACEALREADYEXISTS This process has already created a primary surface.
DDERR_REGIONTOOSMALL The region passed to the IDirectDrawClipper::GetClipList method is too small.
DDERR_SURFACEALREADYATTACHED An attempt was made to attach a surface to another surface while they are already attached.
DDERR_SURFACEALREADYDEPENDENT An attempt was made to make a surface a dependency of another surface to which it is already dependent.
DDERR_SURFACEBUSY Access to the surface is refused because the surface is locked by another thread.
DDERR_SURFACEISOBSCURED Access to the surface is refused because the surface is obscured.
DDERR_SURFACELOST Access to the surface is refused because the surface memory is gone. Call the IDirectDrawSurface5::Restore method on this surface to restore the memory associated with it.
DDERR_SURFACENOTATTACHED The requested surface is not attached.
DDERR_TOOBIGHEIGHT The height requested by DirectDraw is too large.
DDERR_TOOBIGSIZE The size requested by DirectDraw is too large. However, the individual height and width are valid sizes.
DDERR_TOOBIGWIDTH The width requested by DirectDraw is too large.
DDERR_UNSUPPORTED The operation is not supported.
DDERR_UNSUPPORTEDFORMAT The pixel format requested is not supported by DirectDraw.
DDERR_UNSUPPORTEDMASK The bitmask in the pixel format requested is not supported by DirectDraw.
DDERR_UNSUPPORTEDMODE The display is currently in an unsupported mode.
DDERR_VERTICALBLANKINPROGRESS A vertical blank is in progress.
DDERR_VIDEONOTACTIVE The video port is not active.
DDERR_WASSTILLDRAWING The previous blit operation that is transferring information to or from this surface is incomplete.
DDERR_WRONGMODE This surface cannot be restored because it was created in a different mode.
DDERR_XALIGN The provided rectangle was not horizontally aligned on a required boundary.

See Also

IDirectDraw4 | IDirectDrawSurface5 | IDirectDrawPalette | IDirectDrawClipper | IDDVideoPortContainer | DirectDrawCreate | IDirectDraw4::SetCooperativeLevel | IDirectDrawSurface5::GetOverlayPosition | IDirectDrawSurface5::UpdateOverlay | IDirectDrawClipper::GetClipList | IDirectDrawSurface5::Restore | DirectDraw Reference

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.