anchor.diff:  
   ////////////////////////////////////////////////////////////////////////////////
   
  -constructor TMTBIFace.Create;
  +constructor TMTBIFace.Create(AOwner: TComponent);
    begin
     inherited;
    end;
  
positive.code:     function GetDriverVersion():string;                                         // vrati verzi MTBdrv drivery v knihovne
  
      function GetModuleName(Module:Integer):string;                              // vrati jmeno modulu
      procedure SetModuleName(Module:Integer; Name:string);                       // nastavi jmeno modulu
  
      function GetModuleExists(Module:Integer):boolean;                           // vrati jestli modul existuje
      function GetModuleType(Module:Integer):string;                              // vrati typ modulu
  
negative.code:   if (FLib = 0) then
      raise Exception.Create('Library not loaded');
  
    FFuncOnUnload           := TODProc(GetProcAddress(FLib, 'onunload'));
    FFuncSetOutput          := TODSetOutput(GetProcAddress(FLib, 'setoutput'));
    FFuncSetInput           := TODSetInput(GetProcAddress(FLib, 'setinput'));
    FFuncGetInput           := TODGetInput(GetProcAddress(FLib, 'getinput'));
    FFuncGetOutput          := TODGetOutput(GetProcAddress(FLib, 'getoutput'));
    FFuncShowConfigDialog   := TODProc(GetProcAddress(FLib, 'showconfigdialog'));
    FFuncHideConfigDialog   := TODProc(GetProcAddress(FLib, 'hideconfigdialog'));
    FFuncShowAboutDialog    := TODProc(GetProcAddress(FLib, 'showaboutdialog'));
    FFuncStart              := TODProc(GetProcAddress(FLib, 'start'));
    FFuncStop               := TODProc(GetProcAddress(FLib, 'stop'));
    FFuncGetLibVersion      := TODFuncStr(GetProcAddress(FLib, 'getlibversion'));
    FFuncGetDeviceVersion   := TODFuncStr(GetProcAddress(FLib, 'getdeviceversion'));
    FFuncGetDriverVersion   := TODFuncStr(GetProcAddress(FLib, 'getdriverversion'));
    FFuncGetModuleFirmware  := TODModuleStr(GetProcAddress(FLib, 'getmodulefirmware'));
    FFuncModuleExists       := TODModuleExists(GetProcAddress(FLib, 'getmoduleexists'));
    FFuncGetModuleType      := TODModuleStr(GetProcAddress(FLib, 'getmoduletype'));
    FFuncGetModuleName      := TODModuleStr(GetProcAddress(FLib, 'getmodulename'));
    FFuncSetModuleName      := TODSetModuleName(GetProcAddress(FLib, 'setmodulename'));
    FFuncSetBusSpeed        := TODSetBusSpeed(GetProcAddress(FLib, 'setmtbspeed'));
    FFuncSetScanInterval    := TODSetScanInterval(GetProcAddress(FLib, 'settimerinterval'));
    FFuncOpen               := TODProc(GetProcAddress(FLib, 'open'));
    FFuncClose              := TODProc(GetProcAddress(FLib, 'close'));
  
    // assign events:
    setterNotify := TSetDllNotifyEvent(GetProcAddress(FLib, 'setbeforeopen'));
    if (Assigned(setterNotify)) then setterNotify(@OnLibBeforeOpen, self);
    setterNotify := TSetDllNotifyEvent(GetProcAddress(FLib, 'setafteropen'));
    if (Assigned(setterNotify)) then setterNotify(@OnLibAfterOpen, self);
    setterNotify := TSetDllNotifyEvent(GetProcAddress(FLib, 'setbeforeclose'));
    if (Assigned(setterNotify)) then setterNotify(@OnLibBeforeClose, self);
    setterNotify := TSetDllNotifyEvent(GetProcAddress(FLib, 'setafterclose'));
    if (Assigned(setterNotify)) then setterNotify(@OnLibAfterClose, self);
  
    setterNotify := TSetDllNotifyEvent(GetProcAddress(FLib, 'setbeforestart'));
    if (Assigned(setterNotify)) then setterNotify(@OnLibBeforeStart, self);
    setterNotify := TSetDllNotifyEvent(GetProcAddress(FLib, 'setafterstart'));
    if (Assigned(setterNotify)) then setterNotify(@OnLibAfterStart, self);
    setterNotify := TSetDllNotifyEvent(GetProcAddress(FLib, 'setbeforestop'));
    if (Assigned(setterNotify)) then setterNotify(@OnLibBeforeStop, self);
    setterNotify := TSetDllNotifyEvent(GetProcAddress(FLib, 'setafterstop'));
    if (Assigned(setterNotify)) then setterNotify(@OnLibafterStop, self);
  
    setterErr := TSetDllErrEvent(GetProcAddress(FLib, 'setonerror'));
    if (Assigned(setterErr)) then setterErr(@OnLibError, self);
  
    setterModuleChanged := TSetDllEventChange(GetProcAddress(FLib, 'setoninputchange'));
    if (Assigned(setterModuleChanged)) then setterModuleChanged(@OnLibInputChanged, self);
    setterModuleChanged := TSetDllEventChange(GetProcAddress(FLib, 'setonoutputchange'));
    if (Assigned(setterModuleChanged)) then setterModuleChanged(@OnLibOutputChanged, self);
   end;
  
  ////////////////////////////////////////////////////////////////////////////////
  