public static StartupInput GetDefaultStartupInput() { StartupInput result = new StartupInput(); result.GdiplusVersion = 1; result.SuppressBackgroundThread = false; result.SuppressExternalCodecs = false; return(result); }
/// <summary> /// 初始化GDI+ /// </summary> public static void InitGDIPlus() { if (gdipToken == IntPtr.Zero) // 初始化GDI+ { StartupInput input = StartupInput.GetDefaultStartupInput(); StartupOutput output; int status = GdiplusStartup(out gdipToken, ref input, out output); } }
internal static extern int GdiplusStartup(out IntPtr token, ref StartupInput input, out StartupOutput output);