procedure TfrPlantafel.SendData(aImage, aLink, aText:
String);
var receiverHandle : THandle;
copyDataStruct : TCopyDataStruct;
SendMsgText: WideString;
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 := PWideChar(SendMsgText);
SendMessage(receiverHandle, WM_COPYDATA, LPARAM(
Handle), WPARAM(@copyDataStruct)) ;
end else
begin
bsm('
Die Sender Anwendung läuft nicht.');
end;
end;