[API]
GDIPlusStartupInput
GdiplusStartupOutput
GdiplusStartup
GdiplusShutdown
GDIPlus_Status

[DEFINE]
Private GDIPlus_Token As Long
Private GDIPlus_Count As Long

[CODE]
Public Function UseGDIPlus() As Boolean
  Dim GdipStartupInput As GDIPlusStartupInput
  Dim GdipStartupOutput As GdiplusStartupOutput
  
  If GDIPlus_Count = 0& Then
    GdipStartupInput.GdiPlusVersion = 1&
    If Not GdiplusStartup(GDIPlus_Token, GdipStartupInput, GdipStartupOutput) = OK Then
      Exit Function
      End If
    End If
  GDIPlus_Count = GDIPlus_Count + 1&
  UseGDIPlus = True
  End Function

Public Sub UnUseGDIPlus()
  GDIPlus_Count = GDIPlus_Count - 1&
  If GDIPlus_Count = 0& Then
    Call GdiplusShutdown(GDIPlus_Token)
    End If
  End Sub

