Function 60 - Inter Process Communication (IPC).
IPC is used for message dispatching from one process/thread to
another. Previously it is necessary to agree how to interpret
the concrete message.
Subfunction 1 - set the area for IPC receiving
Is called by process-receiver.
Parameters:
- eax = 60 - function number
- ebx = 1 - subfunction number
- ecx = pointer to the buffer
- edx = size of the buffer
Returned value:
Format of IPC-buffer:
- +0: dword: if nonzero, buffer is considered locked;
lock/unlock the buffer, when you work with it and need that
buffer data are not changed from outside (no new messages)
- +4: dword: occupied place in the buffer (in bytes)
- +8: first message
- +8+n: second message
- ...
Format of a message:
- +0: dword: PID of sender
- +4: dword: message length (not including this header)
- +8: n*byte: message data
Subfunction 2 - send IPC message
Is called by process-sender.
Parameters:
- eax = 60 - function number
- ebx = 2 - subfunction number
- ecx = PID of receiver
- edx = pointer to the message data
- esi = message length (in bytes)
Returned value:
- eax = 0 - success
- eax = 1 - the receiver has not defined buffer for IPC messages
(can be, still have no time,
and can be, this is not right process)
- eax = 2 - the receiver has blocked IPC-buffer; try to wait a bit
- eax = 3 - overflow of IPC-buffer of the receiver
- eax = 4 - process/thread with such PID does not exist
Remarks:
- Immediately after writing of IPC-message to the buffer the system
sends to the receiver the event with code 7 (see event codes).