procedure TfrPlantafel.SendData(aImage, aLink, aText:
String);
var receiverHandle : THandle;
copyDataStruct : TCopyDataStruct;
SendMsgText:
String;
begin
receiverHandle := FindWindow(PChar('
TfrSenderApp'),PChar('
frSenderApp'));
SendMsgText := Format('
%s;%s;%s',[aLink, aImage, aText]);
//<< SendMsgText ist 120 Bytes lang.
if receiverHandle > 0
then
begin
copyDataStruct.dwData := Ord(ntSendWhatsAppMsg);
copyDataStruct.cbData := 1 + Length(SendMsgText);
copyDataStruct.lpData := PChar(SendMsgText);
SendMessage(receiverHandle, WM_COPYDATA, LPARAM(
Handle), WPARAM(@copyDataStruct)) ;
end else
begin
bsm('
Die Sender Anwendung läuft nicht.');
end;
end;