📄 dxsurfacemgr.h
字号:
// Only one DC can be retrieved for each surface.
lpszError = TEXT("DDERR_DCALREADYCREATED");
break;
case DDERR_DIRECTDRAWALREADYCREATED:
// A DirectDraw object representing this driver
// has already been created for this process.
lpszError = TEXT("DDERR_DIRECTDRAWALREADYCREATED");
break;
case DDERR_EXCEPTION:
// An exception was encountered while
// performing the requested operation.
lpszError = TEXT("DDERR_EXCEPTION");
break;
case DDERR_EXCLUSIVEMODEALREADYSET:
// An attempt was made to set the cooperative
// level when it was already set to exclusive.
lpszError = TEXT("DDERR_EXCLUSIVEMODEALREADYSET");
break;
case DDERR_GENERIC:
// There is an undefined error condition.
lpszError = TEXT("DDERR_GENERIC");
break;
case DDERR_HEIGHTALIGN:
// The height of the provided rectangle
// is not a multiple of the required alignment.
lpszError = TEXT("DDERR_HEIGHTALIGN");
break;
case DDERR_HWNDALREADYSET:
// The DirectDraw cooperative level window
// handle has already been set. It cannot
// be reset while the process has surfaces or palettes created.
lpszError = TEXT("DDERR_HWNDALREADYSET");
break;
case DDERR_HWNDSUBCLASSED:
// DirectDraw is prevented from restoring state because the
// DirectDraw cooperative level window handle has been subclassed.
lpszError = TEXT("DDERR_HWNDSUBCLASSED");
break;
case DDERR_IMPLICITLYCREATED:
// The surface cannot be restored because
// it is an implicitly created surface.
lpszError = TEXT("DDERR_IMPLICITLYCREATED");
break;
case DDERR_INCOMPATIBLEPRIMARY:
// The primary surface creation request
// does not match with the existing primary surface.
lpszError = TEXT("DDERR_INCOMPATIBLEPRIMARY");
break;
case DDERR_INVALIDCAPS:
// One or more of the capability bits
// passed to the callback function are incorrect.
lpszError = TEXT("DDERR_INVALIDCAPS");
break;
case DDERR_INVALIDCLIPLIST:
// DirectDraw does not support the provided clip list.
lpszError = TEXT("DDERR_INVALIDCLIPLIST");
break;
case DDERR_INVALIDDIRECTDRAWGUID:
// The globally unique identifier (GUID) passed to the
// DirectDrawCreate function is not a valid DirectDraw driver identifier.
lpszError = TEXT("DDERR_INVALIDDIRECTDRAWGUID");
break;
case DDERR_INVALIDMODE:
// DirectDraw does not support the requested mode.
lpszError = TEXT("DDERR_INVALIDMODE");
break;
case DDERR_INVALIDOBJECT:
// DirectDraw received a pointer that was an invalid DirectDraw object.
lpszError = TEXT("DDERR_INVALIDOBJECT");
break;
case DDERR_INVALIDPARAMS:
// One or more of the parameters passed to the method are incorrect.
lpszError = TEXT("DDERR_INVALIDPARAMS");
break;
case DDERR_INVALIDPIXELFORMAT:
// The pixel format was invalid as specified.
lpszError = TEXT("DDERR_INVALIDPIXELFORMAT");
break;
case DDERR_INVALIDPOSITION:
// The position of the overlay on the destination is no longer legal.
lpszError = TEXT("DDERR_INVALIDPOSITION");
break;
case DDERR_INVALIDRECT:
// The provided rectangle was invalid.
lpszError = TEXT("DDERR_INVALIDRECT");
break;
case DDERR_INVALIDSURFACETYPE:
// The requested operation could not be performed
// because the surface was of the wrong type.
lpszError = TEXT("DDERR_INVALIDSURFACETYPE");
break;
case DDERR_LOCKEDSURFACES:
// One or more surfaces are locked,
// causing the failure of the requested operation.
lpszError = TEXT("DDERR_LOCKEDSURFACES");
break;
case DDERR_MOREDATA:
// There is more data available than the specified
// buffer size could hold.
lpszError = TEXT("DDERR_MOREDATA");
break;
case DDERR_NO3D:
// No 3D hardware or emulation is present.
lpszError = TEXT("DDERR_NO3D");
break;
case DDERR_NOALPHAHW:
// No alpha acceleration hardware is present or available,
// causing the failure of the requested operation.
lpszError = TEXT("DDERR_NOALPHAHW");
break;
case DDERR_NOBLTHW:
// No blitter hardware is present.
lpszError = TEXT("DDERR_NOBLTHW");
break;
case DDERR_NOCLIPLIST:
// No clip list is available.
lpszError = TEXT("DDERR_NOCLIPLIST");
break;
case DDERR_NOCLIPPERATTACHED:
// No DirectDrawClipper object is attached to the surface object.
lpszError = TEXT("DDERR_NOCLIPPERATTACHED");
break;
case DDERR_NOCOLORCONVHW:
// The operation cannot be carried out because
// no color-conversion hardware is present or available.
lpszError = TEXT("DDERR_NOCOLORCONVHW");
break;
case DDERR_NOCOLORKEY:
// The surface does not currently have a color key.
lpszError = TEXT("DDERR_NOCOLORKEY");
break;
case DDERR_NOCOLORKEYHW:
// The operation cannot be carried out because there
// is no hardware support for the destination color key.
lpszError = TEXT("DDERR_NOCOLORKEYHW");
break;
case DDERR_NOCOOPERATIVELEVELSET:
// A create function is called without the
// IDirectDraw2::SetCooperativeLevel method being called.
lpszError = TEXT("DDERR_NOCOOPERATIVELEVELSET");
break;
case DDERR_NODC:
// No DC has ever been created for this surface.
lpszError = TEXT("DDERR_NODC");
break;
case DDERR_NODDROPSHW:
// No DirectDraw raster operation (ROP) hardware is available.
lpszError = TEXT("DDERR_NODDROPSHW");
break;
case DDERR_NODIRECTDRAWHW:
// Hardware-only DirectDraw object creation is not possible;
// the driver does not support any hardware.
lpszError = TEXT("DDERR_NODIRECTDRAWHW");
break;
case DDERR_NODIRECTDRAWSUPPORT:
// DirectDraw support is not possible with the current display driver.
lpszError = TEXT("DDERR_NODIRECTDRAWSUPPORT");
break;
case DDERR_NOEMULATION:
// Software emulation is not available.
lpszError = TEXT("DDERR_NOEMULATION");
break;
case DDERR_NOEXCLUSIVEMODE:
// The operation requires the application to have
// exclusive mode, but the application does not have exclusive mode.
lpszError = TEXT("DDERR_NOEXCLUSIVEMODE");
break;
case DDERR_NOFLIPHW:
// Flipping visible surfaces is not supported.
lpszError = TEXT("DDERR_NOFLIPHW");
break;
case DDERR_NOGDI:
// No GDI is present.
lpszError = TEXT("DDERR_NOGDI");
break;
case DDERR_NOHWND:
// Clipper notification requires a window handle,
// or no window handle has been previously set
// as the cooperative level window handle.
lpszError = TEXT("DDERR_NOHWND");
break;
case DDERR_NOMIPMAPHW:
// The operation cannot be carried out because no
// mipmap texture mapping hardware is present or available.
lpszError = TEXT("DDERR_NOMIPMAPHW");
break;
case DDERR_NOMIRRORHW:
// The operation cannot be carried out because
// no mirroring hardware is present or available.
lpszError = TEXT("DDERR_NOMIRRORHW");
break;
case DDERR_NONONLOCALVIDMEM:
// An attempt was made to allocate non-local video memory
// from a device that does not support non-local video memory.
lpszError = TEXT("DDERR_NONONLOCALVIDMEM");
break;
case DDERR_NOOVERLAYDEST:
// The IDirectDrawSurface2::GetOverlayPosition method
// is called on an overlay that the IDirectDrawSurface2::UpdateOverlay
// method has not been called on to establish a destination.
lpszError = TEXT("DDERR_NOOVERLAYDEST");
break;
case DDERR_NOOVERLAYHW:
// The operation cannot be carried out because
// no overlay hardware is present or available.
lpszError = TEXT("DDERR_NOOVERLAYHW");
break;
case DDERR_NOPALETTEATTACHED:
// No palette object is attached to this surface.
lpszError = TEXT("DDERR_NOPALETTEATTACHED");
break;
case DDERR_NOPALETTEHW:
// There is no hardware support for 16- or 256-color palettes.
lpszError = TEXT("DDERR_NOPALETTEHW");
break;
case DDERR_NORASTEROPHW:
// The operation cannot be carried out because
// no appropriate raster operation hardware is present or available.
lpszError = TEXT("DDERR_NORASTEROPHW");
break;
case DDERR_NOROTATIONHW:
// The operation cannot be carried out because
// no rotation hardware is present or available.
lpszError = TEXT("DDERR_NOROTATIONHW");
break;
case DDERR_NOSTRETCHHW:
// The operation cannot be carried out because
// there is no hardware support for stretching.
lpszError = TEXT("DDERR_NOSTRETCHHW");
break;
case DDERR_NOT4BITCOLOR:
// The DirectDrawSurface object is not using a
// 4-bit color palette and the requested operation
// requires a 4-bit color palette.
lpszError = TEXT("DDERR_NOT4BITCOLOR");
break;
case 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.
lpszError = TEXT("DDERR_NOT4BITCOLORINDEX");
break;
case DDERR_NOT8BITCOLOR:
// The DirectDrawSurface object is not using an 8-bit
// color palette and the requested operation requires
// an 8-bit color palette.
lpszError = TEXT("DDERR_NOT8BITCOLOR");
break;
case DDERR_NOTAOVERLAYSURFACE:
// An overlay component is called for a non-overlay surface.
lpszError = TEXT("DDERR_NOTAOVERLAYSURFACE");
break;
case DDERR_NOTEXTUREHW:
// The operation cannot be carried out because no
// texture-mapping hardware is present or available.
lpszError = TEXT("DDERR_NOTEXTUREHW");
break;
case DDERR_NOTFLIPPABLE:
// An attempt has been made to flip a surface that cannot be flipped.
lpszError = TEXT("DDERR_NOTFLIPPABLE");
break;
case DDERR_NOTFOUND:
// The requested item was not found.
lpszError = TEXT("DDERR_NOTFOUND");
break;
case DDERR_NOTINITIALIZED:
// An attempt was made to call an interface method of a DirectDraw object
// created by CoCreateInstance before the object was initialized.
lpszError = TEXT("DDERR_NOTINITIALIZED");
break;
case DDERR_NOTLOCKED:
// An attempt is made to unlock a surface that was not locked.
lpszError = TEXT("DDERR_NOTLOCKED");
break;
case DDERR_NOTPAGELOCKED:
// An attempt is made to page unlock a surface
// with no outstanding page locks.
lpszError = TEXT("DDERR_NOTPAGELOCKED");
break;
case DDERR_NOTPALETTIZED:
// The surface being used is not a palette-based surface.
lpszError = TEXT("DDERR_NOTPALETTIZED");
break;
case DDERR_NOVSYNCHW:
// The operation cannot be carried out because
// there is no hardware support for vertical blank synchronized operations.
lpszError = TEXT("DDERR_NOVSYNCHW");
break;
case 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.
lpszError = TEXT("DDERR_NOZBUFFERHW");
break;
case DDERR_NOZOVERLAYHW:
// The overlay surfaces cannot be z-layered based
// on the z-order because the hardware does not
// support z-ordering of overlays.
lpszError = TEXT("DDERR_NOZOVERLAYHW");
break;
case DDERR_OUTOFCAPS:
// The hardware needed for the requested operation has already been allocated.
lpszError = TEXT("DDERR_OUTOFCAPS");
break;
case DDERR_OUTOFMEMORY:
// DirectDraw does not have enough memory to perform the operation.
lpszError = TEXT("DDERR_OUTOFMEMORY");
break;
case DDERR_OUTOFVIDEOMEMORY:
// DirectDraw does not have enough display memory to perform the operation.
lpszError = TEXT("DDERR_OUTOFVIDEOMEMORY");
break;
case DDERR_OVERLAYCANTCLIP:
// The hardware does not support clipped overlays.
lpszError = TEXT("DDERR_OVERLAYCANTCLIP");
break;
case DDERR_OVERLAYCOLORKEYONLYONEACTIVE:
// An attempt was made to have more than one color key active on an overlay.
lpszError = TEXT("DDERR_OVERLAYCOLORKEYONLYONEACTIVE");
break;
case DDERR_OVERLAYNOTVISIBLE:
// The IDirectDrawSurface2::GetOverlayPosition method is called on a hidden overlay.
lpszError = TEXT("DDERR_OVERLAYNOTVISIBLE");
break;
case DDERR_PALETTEBUSY:
// Access to this palette is refused
// because the palette is locked by another thread.
lpszError = TEXT("DDERR_PALETTEBUSY");
break;
case DDERR_PRIMARYSURFACEALREADYEXISTS:
// This process has already created a primary surface.
lpszError = TEXT("DDERR_PRIMARYSURFACEALREADYEXISTS");
break;
case DDERR_REGIONTOOSMALL:
// The region passed to the
// IDirectDrawClipper::GetClipList method is too small.
lpszError = TEXT("DDERR_REGIONTOOSMALL");
break;
case DDERR_SURFACEALREADYATTACHED:
// An attempt was made to attach a surface to
// another surface to which it is already attached.
lpszError = TEXT("DDERR_SURFACEALREADYATTACHED");
break;
case DDERR_SURFACEALREADYDEPENDENT:
// An attempt was made to make a surface a dependency
// of another surface to which it is already dependent.
lpszError = TEXT("DDERR_SURFACEALREADYDEPENDENT");
break;
case DDERR_SURFACEBUSY:
// Access to the surface is refused because the
// surface is locked by another thread.
lpszError = TEXT("DDERR_SURFACEBUSY");
break;
case DDERR_SURFACEISOBSCURED:
// Access to the surface is refused
// because the surface is obscured.
lpszError = TEXT("DDERR_SURFACEISOBSCURED");
break;
case DDERR_SURFACELOST:
// Access to the surface is refused because the
// surface memory is gone. The DirectDrawSurface
// object representing this surface should have
// the IDirectDrawSurface2::Restore method called on it.
lpszError = TEXT("DDERR_SURFACELOST");
break;
case DDERR_SURFACENOTATTACHED:
// The requested surface is not attached.
lpszError = TEXT("DDERR_SURFACENOTATTACHED");
break;
case DDERR_TOOBIGHEIGHT:
// The height requested by DirectDraw is too large.
lpszError = TEXT("DDERR_TOOBIGHEIGHT");
break;
case DDERR_TOOBIGSIZE:
// The size requested by DirectDraw is too large.
// However, the individual height and width are OK.
lpszError = TEXT("DDERR_TOOBIGSIZE");
break;
case DDERR_TOOBIGWIDTH:
// The width requested by DirectDraw is too large.
lpszError = TEXT("DDERR_TOOBIGWIDTH");
break;
case DDERR_UNSUPPORTED:
// The operation is not supported.
lpszError = TEXT("DDERR_UNSUPPORTED");
break;
case DDERR_UNSUPPORTEDFORMAT:
// The FourCC format requested is not supported by DirectDraw.
lpszError = TEXT("DDERR_UNSUPPORTEDFORMAT");
break;
case DDERR_UNSUPPORTEDMASK:
// The bitmask in the pixel format requested is not supported by DirectDraw.
lpszError = TEXT("DDERR_UNSUPPORTEDMASK");
break;
case DDERR_UNSUPPORTEDMODE:
// The display is currently in an unsupported mode.
lpszError = TEXT("DDERR_UNSUPPORTEDMODE");
break;
case DDERR_VERTICALBLANKINPROGRESS:
// A vertical blank is in progress.
lpszError = TEXT("DDERR_VERTICALBLANKINPROGRESS");
break;
case DDERR_WASSTILLDRAWING:
// The previous blit operation that is transferring
// information to or from this surface is incomplete.
lpszError = TEXT("DDERR_WASSTILLDRAWING");
break;
case DDERR_WRONGMODE:
// This surface cannot be restored because it was created in a different mode.
lpszError = TEXT("DDERR_WRONGMODE");
break;
case DDERR_XALIGN:
// The provided rectangle was not horizontally aligned on a required boundary.
lpszError = TEXT("DDERR_XALIGN");
break;
case DDERR_VIDEONOTACTIVE:
// The video port is not active
lpszError = TEXT("DDERR_VIDEONOTACTIVE");
break;
default:
// Unknown DD/D3D/App Error
wsprintf (szMsg, "Unknown Error #%ld", (DWORD)(hResult & 0x0000FFFFL));
lpszError = szMsg;
break;
}
// Copy DD/D3D Error string to buff
cLen = strlen (lpszError);
if (cLen >= cchError)
{
cLen = cchError - 1;
}
if (cLen)
{
strncpy (lpszErrorBuff, lpszError, cLen);
lpszErrorBuff[cLen] = 0;
}
return TRUE;
} // End GetDDErrorString
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -