public static StartupInput GetDefaultStartupInput() { StartupInput result = new StartupInput(); result.GdiplusVersion = 1; result.SuppressBackgroundThread = false; result.SuppressExternalCodecs = false; return(result); }
static ImageFast() { #if DEBUG Console.WriteLine("Initializing GDI+"); #endif if (gdipToken == IntPtr.Zero) { StartupInput input = StartupInput.GetDefaultStartupInput(); StartupOutput output; int status = GdiplusStartup(out gdipToken, ref input, out output); #if DEBUG if (status == 0) { Console.WriteLine("Initializing GDI+ completed successfully"); } #endif if (status == 0) { AppDomain.CurrentDomain.ProcessExit += new EventHandler(Cleanup_Gdiplus); } } }
private static extern int GdiplusStartup(out IntPtr token, ref StartupInput input, out StartupOutput output);