DirectDraw Return Values

Send Feedback

Errors are represented by negative values and cannot be combined.

This table lists the values that can be returned by all methods of the IDirectDraw, IDirectDrawSurface, and IDirectDrawClipper interfaces.

For a list of the error codes that each method can return, see the method description.

Return code PPC SP Description
DD_OK X X The request completed successfully.
DDERR_CANTCREATEDC X X 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_CANTLOCKSURFACE X X Access to this surface is refused because an attempt was made to lock the primary surface without DCI support.
DDERR_CLIPPERISUSINGHWND X X An attempt was made to set a clip list for a DirectDrawClipper object that is already monitoring a window handle.
DDERR_COLORKEYNOTSET X X No source color key is specified for this operation.
DDERR_CURRENTLYNOTAVAIL X X No support is currently available.
DDERR_DCALREADYCREATED X X A device context (DC) has already been returned for this surface. Only one DC can be retrieved for each surface.
DDERR_DEVICEDOESNTOWNSURFACE X X Surfaces created by one DirectDraw device cannot be used directly by another DirectDraw device.
DDERR_DIRECTDRAWALREADYCREATED X X A DirectDraw object representing this driver has already been created for this process.
DDERR_EXCLUSIVEMODEALREADYSET X X An attempt was made to set the cooperative level when it was already set to exclusive.
DDERR_GENERIC X X There is an undefined error condition.
DDERR_HEIGHTALIGN X X The height of the provided rectangle is not a multiple of the required alignment.
DDERR_IMPLICITLYCREATED X X The surface cannot be restored because it is an implicitly created surface.
DDERR_INCOMPATIBLEPRIMARY X X The primary surface creation request does not match the existing primary surface.
DDERR_INVALIDCAPS X X One or more of the capability bits passed to the callback function are incorrect.
DDERR_INVALIDCLIPLIST X X DirectDraw does not support the provided clip list.
DDERR_INVALIDMODE X X DirectDraw does not support the requested mode.
DDERR_INVALIDOBJECT X X DirectDraw received a pointer that was an invalid DirectDraw object.
DDERR_INVALIDPARAMS X X One or more of the parameters passed to the method are incorrect.
DDERR_INVALIDPIXELFORMAT X X The pixel format was invalid as specified.
DDERR_INVALIDPOSITION X X The position of the overlay on the destination is no longer valid.
DDERR_INVALIDRECT X X The provided rectangle was invalid.
DDERR_LOCKEDSURFACES X X One or more surfaces are locked, causing the failure of the requested operation.
DDERR_MOREDATA X X There is more data available than the specified buffer size can hold.
DDERR_NOALPHAHW X X No alpha acceleration hardware is present or available, causing the failure of the requested operation.
DDERR_NOBLTHW X X No blitter hardware is present.
DDERR_NOCLIPLIST X X No clip list is available.
DDERR_NOCLIPPERATTACHED X X No DirectDrawClipper object is attached to the surface object.
DDERR_NOCOLORCONVHW X X The operation cannot be carried out because no color-conversion hardware is present or available.
DDERR_NOCOLORKEYHW X X The operation cannot be carried out because there is no hardware support for the destination color key.
DDERR_NOCOOPERATIVELEVELSET X X A create function is called without the IDirectDraw::SetCooperativeLevel method being called.
DDERR_NODC X X No DC has been created for this surface.
DDERR_NOFLIPHW X X Flipping visible surfaces is not supported.
DDERR_NOOVERLAYDEST X X The IDirectDrawSurface::GetOverlayPosition method is called on an overlay but the IDirectDrawSurface::UpdateOverlay method has not been called on to establish a destination.
DDERR_NOOVERLAYHW X X The operation cannot be carried out because no overlay hardware is present or available.
DDERR_NOPALETTEATTACHED X X No palette object is attached to this surface.
DDERR_NOPALETTEHW X X There is no hardware support for 16- or 256-color palettes.
DDERR_NORASTEROPHW X X The operation cannot be carried out because no appropriate raster operation hardware is present or available.
DDERR_NOSTRETCHHW X X The operation cannot be carried out because there is no hardware support for stretching.
DDERR_NOTAOVERLAYSURFACE X X An overlay component is called for a non-overlay surface.
DDERR_NOTFLIPPABLE X X An attempt has been made to flip a surface that cannot be flipped.
DDERR_NOTFOUND X X The requested item was not found.
DDERR_NOTLOCKED X X An attempt is made to unlock a surface that was not locked.
DDERR_NOTPALETTIZED X X The surface being used is not a palette-based surface.
DDERR_NOVSYNCHW X X The operation cannot be carried out because there is no hardware support for vertical blank synchronized operations.
DDERR_NOZOVERLAYHW X X Not supported.
DDERR_OUTOFCAPS X X The hardware needed for the requested operation has already been allocated.
DDERR_OUTOFMEMORY X X DirectDraw does not have enough memory to perform the operation.
DDERR_OUTOFVIDEOMEMORY X X DirectDraw does not have enough display memory to perform the operation.
DDERR_OVERLAPPINGRECTS X X Operation could not be carried out because the source and destination rectangles are on the same surface and overlap each other.
DDERR_OVERLAYNOTVISIBLE X X The IDirectDrawSurface::GetOverlayPosition method is called on a hidden overlay.
DDERR_PALETTEBUSY X X Access to this palette is refused because the palette is locked by another thread.
DDERR_PRIMARYSURFACEALREADYEXISTS X X This process has already created a primary surface.
DDERR_REGIONTOOSMALL X X The region passed to the IDirectDrawClipper::GetClipList method is too small.
DDERR_SURFACEBUSY X X Access to the surface is refused because the surface is locked by another thread.
DDERR_SURFACELOST X X Access to the surface is refused because the surface memory is gone. Call the IDirectDrawSurface::Restore method on this surface to restore the memory associated with it.
DDERR_TOOBIGHEIGHT X X The height requested by DirectDraw is too large.
DDERR_TOOBIGSIZE X X The size requested by DirectDraw is too large. However, the individual height and width are valid sizes.
DDERR_TOOBIGWIDTH X X The width requested by DirectDraw is too large.
DDERR_UNSUPPORTED X X The operation is not supported.
DDERR_UNSUPPORTEDFORMAT X X The pixel format requested is not supported by DirectDraw.
DDERR_VERTICALBLANKINPROGRESS X X A vertical blank is in progress.
DDERR_VIDEONOTACTIVE X X The video port is not active.
DDERR_WASSTILLDRAWING X X The previous blit operation that is transferring information to or from this surface is incomplete.
DDERR_WRONGMODE X X This surface cannot be restored because it was created in a different mode.

See Also

IDirectDraw | IDirectDrawSurface | IDirectDrawClipper | DirectDrawCreate | IDirectDraw::SetCooperativeLevel | IDirectDrawSurface::GetOverlayPosition | IDirectDrawSurface::UpdateOverlay | IDirectDrawClipper::GetClipList | IDirectDrawSurface::Restore | DirectDraw Reference

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.