Library PDFlibDLL;
{$I ..\Lib\PDFlibDefines.inc}

Uses
{$IFNDEF XE2+}
  Windows,
{$ELSE}
  Winapi.Windows,
{$ENDIF}
  PDFlibDllFunctions;
{$R *.RES}
{$INCLUDE PDFlibDLLExports.inc}
{$IFDEF WIN64}
{$LIBSUFFIX '64'}
{$ELSE}
{$LIBSUFFIX '32'}
{$ENDIF}

Procedure DLLEntryProc(EntryCode: integer);
Begin
  Case EntryCode Of
    DLL_PROCESS_DETACH:
      FinalizeLibrary;
    DLL_PROCESS_ATTACH:
      Begin
        IsMultiThread := True;
        DisableThreadLibraryCalls(HInstance);
        InitLibrary;
      End;
  End;
End;

Begin
  DLLProc := @DLLEntryProc;
  DLLEntryProc(DLL_PROCESS_ATTACH);

End.
