{$ifdef BIN_IMPORT_} var rsz:integer; {$else} begin pt:=integer(pFileText); i:=0; if FileLen>=$30 then if (StrLComp(PChar(pt),'midp-rms',8)=0) then begin if FileLen>=$48 then if (RLInteger(pt+$40)=$48) then begin fsz:=RLInteger(pt+$44); i:=$48; end; if (RLInteger(pt+$28)=$30) then begin fsz:=RLInteger(pt+$2C); i:=$30; end; if (DContact.hContact=0) or (DContact.hContact=INVALID_HANDLE_VALUE) then if (fContact.hContact<>0) and (fContact.hContact<>INVALID_HANDLE_VALUE) then DContact:=fContact; if (DContact.hContact<>0) and (DContact.hContact<>INVALID_HANDLE_VALUE) then begin proto:=GetContactProto(DContact.hContact); DoMessage(ITXT_THREAD_DEST_CONTACT,DContact.hContact,0); DoMessage(ITXT_THREAD_START,0,0); DoMessage(ITXT_THREAD_MAXPROGRESS,0,fsz); while i0 then Inc(AddedMessages) else begin s:= 'Error adding message to DB'; DoMessage(ITXT_THREAD_ERROR,integer(PWideChar(s)),0); break; end else Inc(Duplicates); finally inc(i,rsz); end; DoMessage(ITXT_THREAD_PROGRESS,i,0); end; end else begin s:=TranslateWideString('Can''t determine destination contact'); DoMessage(ITXT_THREAD_ERROR,integer(PWideChar(s)),0); end; end else begin s:=WideFormat(TranslateWideString('Its not %s file'),['midp-rms']); DoMessage(ITXT_THREAD_ERROR,integer(PWideChar(s)),0); end else //file len end; {$endif}