anchor.diff:  {--------}
   procedure TAbVirtualMemoryStream.vmsSwapFileDestroy;
   begin
  -  if (vmsSwapHandle <> 0) then begin
  -    FileClose(vmsSwapHandle);
  +  if (vmsSwapStream <> nil) then begin
  +    FreeAndNil(vmsSwapStream);
       DeleteFile(vmsSwapFileName);
  -    vmsSwapHandle := 0;
     end;
   end;
   {--------}
  
positive.code: {--------}
  procedure TAbVirtualMemoryStream.vmsSwapFileCreate;
  begin
    if (vmsSwapHandle = 0) then begin
      vmsSwapFileName := AbCreateTempFile(vmsSwapFileDir);
      vmsSwapHandle := FileOpen(vmsSwapFileName, fmOpenReadWrite);
      if (vmsSwapHandle <= 0) then begin
        vmsSwapHandle := 0;
        DeleteFile(vmsSwapFileName);
        raise EAbVMSErrorOpenSwap.Create( vmsSwapFileName );             
      end;
      vmsSwapFileSize := 0;
    end;
  
negative.code:   BytesRead : Longint;
    SeekResult: Int64;
  begin
    if (vmsSwapStream = nil) or (aPage^.vpStmOfs >= vmsSwapFileSize) then begin
      {there is nothing to be read from the disk (either the swap file
       doesn't exist or it's too small) so zero out the page data}
      FillChar(aPage^.vpData, AB_VMSPageSize, 0)
    end
    else {there is something to be read from the swap file} begin
      SeekResult := vmsSwapStream.Seek(aPage^.vpStmOfs, soBeginning);
      if (SeekResult = -1) then
        raise EAbVMSSeekFail.Create( vmsSwapFileName );
      BytesRead := vmsSwapStream.Read(aPage^.vpData, AB_VMSPageSize);
      if (BytesRead <> AB_VMSPageSize) then
        raise EAbVMSReadFail.Create( AB_VMSPageSize, vmsSwapFileName );
    end;
  end;
  {--------}
  procedure TAbVirtualMemoryStream.vmsSwapFileWrite(aPage : PvmsPage);
  var
    NewPos : Int64;
    SeekResult: Int64;
    BytesWritten : Longint;
  begin
    if (vmsSwapStream = nil) then
      vmsSwapFileCreate;
    SeekResult := vmsSwapStream.Seek(aPage^.vpStmOfs, soBeginning);
    if (SeekResult = -1) then
      raise EAbVMSSeekFail.Create( vmsSwapFileName );
    BytesWritten := vmsSwapStream.Write(aPage^.vpData, AB_VMSPageSize);
    if BytesWritten <> AB_VMSPageSize then
      raise EAbVMSWriteFail.Create( AB_VMSPageSize, vmsSwapFileName );   
    NewPos := aPage^.vpStmOfs + AB_VMSPageSize;
  