Esempio n. 1
0
        public static StartupInput GetDefaultStartupInput()
        {
            StartupInput result = new StartupInput();

            result.GdiplusVersion           = 1;
            result.SuppressBackgroundThread = false;
            result.SuppressExternalCodecs   = false;
            return(result);
        }
Esempio n. 2
0
        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);
                }
            }
        }
Esempio n. 3
0
 private static extern int GdiplusStartup(out IntPtr token, ref StartupInput input, out StartupOutput output);