anchor.diff:    MIF_HIDDEN     = $00200000;
   
   (*
  -struct FarMenuItemEx
  -{
  -  DWORD Flags;
  +struct FarMenuItem
  +{
  +  MENUITEMFLAGS Flags;
     const wchar_t *Text;
  -  DWORD AccelKey;
  -  DWORD Reserved;
  -  DWORD_PTR UserData;
  -};
  -*)
  -type
  -  PFarMenuItemEx = ^TFarMenuItemEx;
  -  TFarMenuItemEx = record
  -    Flags : DWORD;
  -    TextPtr : PFarChar;
  -    AccelKey : DWORD;
  -    Reserved : DWORD;
  -    UserData : DWORD_PTR;
  -  end;
  -
  +  struct FarKey AccelKey;
  +  intptr_t UserData;
  +  intptr_t Reserved[2];
  +};
  +*)
  +type
  +  PFarMenuItem = ^TFarMenuItem;
  +  TFarMenuItem = record
  +    Flags :TMenuItemFlags;
  +    TextPtr :PFarChar;
  +    AccelKey :TFarKey;
  +    UserData :TIntPtr;
  +    Reserved :array[0..1] of TIntPtr;
  +  end;
   
   { FARMENUFLAGS }
   
  -const
  +type
  +  TFarMenuFlags = Int64;
  +
  +const
  +  FMENU_NONE                 = 0;
     FMENU_SHOWAMPERSAND        = $00000001;
     FMENU_WRAPMODE             = $00000002;
     FMENU_AUTOHIGHLIGHT        = $00000004;
     FMENU_REVERSEAUTOHIGHLIGHT = $00000008;
  -  FMENU_USEEXT               = $00000020;
  -  FMENU_CHANGECONSOLETITLE   = $00000040;
  -
  -  {Obsolete}
  -//FMENU_TRUNCPATH            = $10000000;
  -//FMENU_TRUNCSTR             = $20000000;
  -//FMENU_TRUNCSTREND          = $30000000;
  -
  -(*
  -typedef int (WINAPI *FARAPIMENU)(
  -  INT_PTR             PluginNumber,
  -  int                 X,
  -  int                 Y,
  -  int                 MaxHeight,
  -  DWORD               Flags,
  -  const wchar_t      *Title,
  -  const wchar_t      *Bottom,
  -  const wchar_t      *HelpTopic,
  -  const int          *BreakKeys,
  -  int                *BreakCode,
  -  const struct FarMenuItem *Item,
  -  int                 ItemsNumber
  +  FMENU_CHANGECONSOLETITLE   = $00000010;
  +
  +type
  +  PFarMenuItemArray = ^TFarMenuItemArray;
  +  TFarMenuItemArray = packed array[0..MaxInt div SizeOf(TFarMenuItem) - 1] of TFarMenuItem;
  +
  +  PFarKeyArray = ^TFarKeyArray;
  +  TFarKeyArray = packed array[0..MaxInt div SizeOf(TFarKey) - 1] of TFarKey;
  +
  +(*
  +typedef intptr_t (WINAPI *FARAPIMENU)(
  +    const GUID*         PluginId,
  +    const GUID*         Id,
  +    intptr_t            X,
  +    intptr_t            Y,
  +    intptr_t            MaxHeight,
  +    FARMENUFLAGS        Flags,
  +    const wchar_t      *Title,
  +    const wchar_t      *Bottom,
  +    const wchar_t      *HelpTopic,
  +    const struct FarKey *BreakKeys,
  +    intptr_t           *BreakCode,
  +    const struct FarMenuItem *Item,
  +    size_t              ItemsNumber
   );
   *)
   type
     TFarApiMenu = function (
  -    PluginNumber : INT_PTR;
  -    X, Y : Integer;
  -    MaxHeight : Integer;
  -    Flags : DWORD;
  +    const PluginId :TGUID;
  +    const ID :TGUID;
  +    X, Y : TIntPtr;
  +    MaxHeight : TIntPtr;
  +    Flags :TFARMENUFLAGS;
       Title :PFarChar;
       Bottom :PFarChar;
       HelpTopic :PFarChar;
  -    BreakKeys :PIntegerArray;
  -    BreakCode :PIntegerArray;
  +    BreakKeys :PFarKeyArray;
  +    BreakCode :PIntPtrArray;
       Item :PFarMenuItemArray;
  -    ItemsNumber :Integer
  -  ) : Integer; stdcall;
  +    ItemsNumber :size_t
  +  ) :TIntPtr; stdcall;
   
   
   {------------------------------------------------------------------------------}
  
positive.code: type
    PFarDialogItemData = ^TFarDialogItemData;
    TFarDialogItemData = record
      PtrLength : SIZE_T;
      PtrData : PFarChar;
    end;
  
  (*
  struct FarDialogEvent
  {
    HANDLE hDlg;
    int Msg;
    int Param1;
    INT_PTR Param2;
    INT_PTR Result;
  };
  *)
  type
    PFarDialogEvent = ^TFarDialogEvent;
    TFarDialogEvent = record
      hDlg :THandle;
      Msg :Integer;
      Param1 :Integer;
      Param2 :INT_PTR;
      Result :INT_PTR;
    end;
  
  (*
  struct OpenDlgPluginData
  {
    int ItemNumber;
    HANDLE hDlg;
  };
  *)
  type
    POpenDlgPluginData = ^TOpenDlgPluginData;
    TOpenDlgPluginData = record
      ItemNumber :Integer;
      hDlg :THandle;
    end;
  
  (*
  struct DialogInfo
  {
    int StructSize;
    GUID Id;
  };
  *)
  type
    PDialogInfo = ^TDialogInfo;
    TDialogInfo = record
      StructSize :Integer;
      Id :TGUID;
    end;
  
  { FARDIALOGFLAGS }
  
  const
    FDLG_WARNING      = $00000001;
    FDLG_SMALLDIALOG  = $00000002;
    FDLG_NODRAWSHADOW = $00000004;
    FDLG_NODRAWPANEL  = $00000008;
  
  type
  (*
  typedef INT_PTR (WINAPI *FARWINDOWPROC)(
    HANDLE   hDlg,
    int      Msg,
    int      Param1,
    INT_PTR Param2
  );
  *)
    TFarApiWindowProc = function (
      hDlg :THandle;
      Msg :Integer;
      Param1 :Integer;
      Param2 :INT_PTR
    ) :INT_PTR; stdcall;
  
  (*
  typedef INT_PTR (WINAPI *FARAPISENDDLGMESSAGE)(
    HANDLE   hDlg,
    int      Msg,
    int      Param1,
    INT_PTR Param2
  );
  *)
    TFarApiSendDlgMessage = function (
      hDlg : THandle;
      Msg : Integer;
      Param1 : Integer;
      Param2 : INT_PTR
    ) :INT_PTR; stdcall;
  
  (*
  typedef INT_PTR (WINAPI *FARAPIDEFDLGPROC)(
    HANDLE   hDlg,
    int      Msg,
    int      Param1,
    INT_PTR Param2
  );
  *)
    TFarApiDefDlgProc = function (
      hDlg :THandle;
      Msg :Integer;
      Param1 :Integer;
      Param2 :INT_PTR
    ) :INT_PTR; stdcall;
  
  (*
  typedef HANDLE (WINAPI *FARAPIDIALOGINIT)(
    INT_PTR               PluginNumber,
    int                   X1,
    int                   Y1,
    int                   X2,
    int                   Y2,
    const wchar_t        *HelpTopic,
    struct FarDialogItem *Item,
    unsigned int          ItemsNumber,
    DWORD                 Reserved,
    DWORD                 Flags,
    FARWINDOWPROC         DlgProc,
    INT_PTR              Param
  );
  *)
    TFarApiDialogInit = function (
      PluginNumber :INT_PTR;
      X1, Y1, X2, Y2 :Integer;
      HelpTopic :PFarChar;
      Item :PFarDialogItemArray;
      ItemsNumber :Integer;
      Reserved :DWORD;
      Flags :DWORD;
      DlgProc :TFarApiWindowProc;
      Param :INT_PTR
    ) :THandle; stdcall;
  
  (*
  typedef int (WINAPI *FARAPIDIALOGRUN)(
    HANDLE hDlg
  );
  *)
    TFarApiDialogRun = function(
      hDlg :THandle
    ) :Integer;  stdcall;
  
  (*
  typedef void (WINAPI *FARAPIDIALOGFREE)(
  
negative.code: 
  {VIEWER_SETMODEFLAGS_TYPES}
  
  type
    TViewerSetModeFlagsTypes = Int64;
  
  const
    VSMFL_REDRAW   = $00000001;
  
  (*
  struct ViewerSetMode
  {
    size_t StructSize;
    enum VIEWER_SETMODE_TYPES Type;
    union
    {
      intptr_t iParam;
      wchar_t *wszParam;
    }
    Param;
    VIEWER_SETMODEFLAGS_TYPES Flags;
  };
  *)
  type
    PViewerSetMode = ^TViewerSetMode;
    TViewerSetMode = record
      StructSize :size_t;
      ParamType :DWORD; {VIEWER_SETMODE_TYPES}
      Param : record case byte of
        0 : (iParam : TIntPtr);
        1 : (wszParam : PFarChar);
      end;
      Flags :TViewerSetModeFlagsTypes;
    end;
  
  (*
  struct ViewerSelect
  {
    size_t StructSize;
    __int64 BlockStartPos;
    __int64 BlockLen;
  };
  *)
  type
    PViewerSelect = ^TViewerSelect;
    TViewerSelect = record
      StructSize :size_t;
      BlockStartPos :Int64;
      BlockLen :Int64;
    end;
  
  
  { VIEWER_SETPOS_FLAGS }
  
  type
    TViewerSetPosFlags = Int64;
  
  const
    VSP_NOREDRAW    = $0001;
  