Class TmdCustomSecureMail (unit mdMailSlot) |
......................................................... TmdCustomSecureMail .........................................................
Constructors |
Functions |
Properties |
Events |
Variables |
Constructors |
Functions |
......................................................... TmdCustomSecureMail ......................................................... (* Ver 1.5 Procedure TmdCustomSecureMail.DoMessageAvail(Const Msg : String); Var L : Integer; S,C, SubStr : String; Begin L := Length(Msg); SubStr := Copy(Msg,1,L-4); S := Copy(Msg,L-3,4); C := IntTohex(CalcCRC16(SubStr,L-4),4); If S <> C Then DoError(Msg) else // OK ! Begin If (FLastMessage <> NIL) AND (StrComp(FLastMessage,PChar(Msg)) = 0) AND (Copy(String(FLastMessage),1,4) = Copy(Msg,1,4)) Then Begin // Inform about this mail is ignores since it is a duplicate DoDuplicated; end else Begin If FLastMessage <> NIL Then StrDispose(FLastMessage); FLastMessage := StrNew(PChar(Msg)); Inherited DoMessageAvail(Copy(Msg,5,L-8)); end; end; end; *) New in version 1.6
Make sure that we have somewhere to store the data
For version 1.6...secure mail format
Properties |
Events |
New in version 1.6
Variables |