Well back to the path of least resistance. If any C# guru's out there code a SimpleIPCClient-compatible C# implementation toss it in this thread in the future. In the meantime, a SimpleIPCServer and this code to act as a substitute for a client will work:
Lazarus: var
aCopyData: TCopyDataStruct;
hTargetWnd: HWND;
begin
with aCopyData do
begin
dwData := 0;
cbData := StrLen(PChar('test')) + 1;
lpData := PChar('test')
end;
// Search window by the window title
hTargetWnd := FindWindowEx(0, 0, nil, PChar('AppTitleBar'));
if hTargetWnd <> 0 then
SendMessage(hTargetWnd, WM_COPYDATA, Longint(Handle), Longint(@aCopyData))
else
ShowMessage('No Recipient found!');
C#:
protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
case WM_COPYDATA:
COPYDATASTRUCT mystr = new COPYDATASTRUCT();
Type mytype = mystr.GetType();
mystr = (COPYDATASTRUCT)m.GetLParam(mytype);
MessageBox.Show(mystr.lpData);
break;
}
base.WndProc(ref m);