[delphi]//
dll: ganz am ende:
SendMessage(Form2.Handle, succ(WM_USER), myDATA, myDATA);
// hauptprogramm: interface:
procedure myProc(var msg: TMessage); message succ(WM_USER);
// hauptprogramm: code:
procedure TForm2.myProc(var msg: TMessage);
begin
ShowMessage(inttostr(msg.LParam));
end;