Status enumeration (gdiplustypes.h)

The Status enumeration indicates the result of a Windows GDI+ method call.


typedef enum Status {
  Ok = 0,
  GenericError = 1,
  InvalidParameter = 2,
  OutOfMemory = 3,
  ObjectBusy = 4,
  InsufficientBuffer = 5,
  NotImplemented = 6,
  Win32Error = 7,
  WrongState = 8,
  Aborted = 9,
  FileNotFound = 10,
  ValueOverflow = 11,
  AccessDenied = 12,
  UnknownImageFormat = 13,
  FontFamilyNotFound = 14,
  FontStyleNotFound = 15,
  NotTrueTypeFont = 16,
  UnsupportedGdiplusVersion = 17,
  GdiplusNotInitialized = 18,
  PropertyNotFound = 19,
  PropertyNotSupported = 20,
  ProfileNotFound = 21
} ;


Value: 0
Indicates that the method call was successful.
Value: 1
Indicates that there was an error on the method call, which is identified as something other than those defined by the other elements of this enumeration.
Value: 2
Indicates that one of the arguments passed to the method was not valid.
Value: 3
Indicates that the operating system is out of memory and could not allocate memory to process the method call. For an explanation of how constructors use the OutOfMemory status, see the Remarks section at the end of this topic.
Value: 4
Indicates that one of the arguments specified in the API call is already in use in another thread.
Value: 5
Indicates that a buffer specified as an argument in the API call is not large enough to hold the data to be received.
Value: 6
Indicates that the method is not implemented.
Value: 7
Indicates that the method generated a Win32 error.
Value: 8
Indicates that the object is in an invalid state to satisfy the API call. For example, calling
Pen::GetColor from a pen that is not a single, solid color results in a WrongState status.
Value: 9
Indicates that the method was aborted.
Value: 10
Indicates that the specified image file or metafile cannot be found.
Value: 11
Indicates that the method performed an arithmetic operation that produced a numeric overflow.
Value: 12
Indicates that a write operation is not allowed on the specified file.
Value: 13
Indicates that the specified image file format is not known.
Value: 14
Indicates that the specified font family cannot be found. Either the font family name is incorrect or the font family is not installed.
Value: 15
Indicates that the specified style is not available for the specified font family.
Value: 16
Indicates that the font retrieved from an
HDC or
LOGFONT is not a TrueType font and cannot be used with GDI+.
Value: 17
Indicates that the version of GDI+ that is installed on the system is incompatible with the version with which the application was compiled.
Value: 18
Indicates that the GDI+API is not in an initialized state. To function, all GDI+ objects require that GDI+ be in an initialized state. Initialize GDI+ by calling
Value: 19
Indicates that the specified property does not exist in the image.
Value: 20
Indicates that the specified property is not supported by the format of the image and, therefore, cannot be set.
Value: 21
Indicates that the color profile required to save an image in CMYK format was not found.


If you construct a GDI+ object and then immediately call the GetLastStatus method of that object, you can determine whether the constructor succeeded or failed. In such cases, GetLastStatus might return OutOfMemory even though there was plenty of memory available to create the object. Several GDI+ constructors set the status to OutOfMemory when they fail regardless of the reason for failure.


Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Header gdiplustypes.h (include Gdiplus.h)