anchor.diff:    StartPos, LengthSearch: Integer; Options: TRichSearchTypes): Integer;
   var
     Find: TFindTextEx;
  +  FindW: TFindTextExW;
  +  PChrg: Longint;
     Flags: Integer;
     SearchStrUnicode: PWideChar;   // dpv
   begin
  
positive.code: type
    PENLink = ^TENLink;
    PENOleOpFailed = ^TENOleOpFailed;
  {$IFDEF RICHEDIT_VER_41}               // dpv
    TFindTextEx = TFindTextExW;          // Unicode..
  {$ELSE}
    TFindTextEx = TFindTextExA;
  {$ENDIF}
  
  
    TTextRangeA = record
  
negative.code:   RichEditVersion := 1;
    OldError := SetErrorMode(SEM_NOOPENFILEERRORBOX);
    try
  {$IFNDEF RICHEDIT_VER_10}
      FLibHandle := LoadLibrary(RichEdit41ModuleName);
      if (FLibHandle > 0) and (FLibHandle < HINSTANCE_ERROR)  then
          FLibHandle := 0
      else
          RichEditVersion := 4;
  
      if FLibHandle = 0 then begin
          FLibHandle := LoadLibrary(RichEdit20ModuleName);
          if (FLibHandle > 0) and (FLibHandle < HINSTANCE_ERROR) then
              FLibHandle := 0
          else begin
            RichEditVersion := 2;
            Ver.dwOSVersionInfoSize := SizeOf(Ver);
            GetVersionEx(Ver);
  