Example Code

function SendIpcData(const IPC: PAnsiChar; pData: Pointer; dwSize: DWORD): BOOL; stdcall; // Arg1 specifies the "unique" name of IPC sink/channel // Arg2 specifies the data buffer to send via IPC // Arg3 specifies the size of the data being passed procedure Callback(pData: Pointer; dwSize: DWORD); stdcall; begin MessageBoxA(0, pData, 'IPC Message', (MB_ICONINFORMATION or MB_TOPMOST or MB_SETFOREGROUND)); end; var pData: Array [0..2] of AnsiChar; const IPC_NAME: PAnsiChar = 'UNIQUE_IPC_NAME'; begin if CreateIpcSink(IPC_NAME, @Callback) then begin pData[0] := 'H'; pData[1] := 'I'; pData[2] := #0; if SendIpcData(IPC_NAME, @pData, sizeof(pData)) then ShowMessage('IPC message sent successfully!') else ShowMessage('Failed to send IPC data!'); end else ShowMessage('Failed to create IPC Sink!'); end;