GdiplusShutdown function (gdiplusinit.h)
The GdiplusShutdown function cleans up resources used by Windows GDI+. Each call to GdiplusStartup should be paired with a call to GdiplusShutdown.
Syntax
void GdiplusShutdown(
ULONG_PTR token
);
Parameters
token
Type: [in] ULONG_PTR
Token returned by a previous call to GdiplusStartup.
Return value
None
Remarks
You must call GdiplusStartup before you create any GDI+ objects, and you must delete all of your GDI+ objects (or have them go out of scope) before you call GdiplusShutdown.
Note For Windows 7 and earlier, if GDI+ can't create a font family, it substitutes the generic Sans Serif family and client-side caches the pointer for the generic family. Because calls to GdiplusStartup and GdiplusShutdown are not aware of this caching, the operating system retains the pointer for the generic family object past the object's lifetime, which causes the operating system to crash. For Windows 8 and later, GDI+ returns a sentinel value for the generic family object that remains constant across calls to GdiplusStartup and GdiplusShutdown so the operating system doesn't retain the pointer for the generic family object past the object's lifetime.
Examples
For an example of calling GdiplusStartup and GdiplusShutdown, see GdiplusStartup.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP, Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | gdiplusinit.h (include Gdiplus.h) |
Library | Gdiplus.lib |
DLL | Gdiplus.dll |