Hellow tbdev arroba thebat.dutaint.com

  In vampire i'm working in the big mail crash problem. I need info
  about the workingo of the function "getdata".

  The code in the plugin to get the mail is:

  function GetStr(Idx: Integer): String;
  var
    I : Integer;
    {J : Integer;}
  begin
    Result := '';
    try
      I := GetData(MsgID, Idx, nil, 0);
      if I > 0 then
      begin
        if I > Sz then
        begin
          ReallocMem(P, I);
          Sz := I;
        end;
        I := GetData(MsgID, Idx, P, Sz);
        if I > 0 then SetString(Result, P, I);
      end;
    except
      Result := '';
    end;
  end; {GetStr}

  I'm thinking in this modification
  {...}
        if I > 0 then
           if i>50000 then SetString(Result, P, 50000)
           else SetString(Result, P, I);
  {...}

  My hope is: When this modification if the string is larger than
  50000 bytes, the string will be truncated to 50000 bytes.

  ¿50000 is to big? ¿please sugestions about a better value?
-- 
Best Regards,
 Task Control 
   mail: TaskControl at SoftHome dot net
 correo: TaskControl arroba SoftHome punto net

Usando: 
- Windows 98 4.10.1998 
- AVG 6.0 Free Edition
- The Bat! 1.63 Beta/7
- Trillian PRO 1.0 B



________________________________________________
Current version is 1.62 | "Using TBDEV" information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to