Specifies the name of the memory mapping used to receive messages.
void setMessengerName(char* Value);
property MessengerName : string;
Property MessengerName As String
public string MessengerName;
Public Property MessengerName As String
public void setMessengerName(string value);
public string getMessengerName();
This property specifies the name for the memory mapping. The name is used as a destination address for the sender -- the sender should specify this name in the address of the message. See more in Addressing topic.
The value of this property should be compatible with CreateFileMapping WinAPI function. Be sure to use unique names for all kernel objects in your system.
You must remember about namespaces, if you are using MMF transport on any Windows version starting with XP SP2 and later.
The service application should specify the name as "Global\MessengerNameValue".
Regular user-mode application should include "Session" prefix followed by session ID, e.g. "Session\#\MessengerNameValue", where # is the ID of the user session.
To obtain the ID of the session in which your process is running, you need to
The following information applies when you need to compose the address to send the message to another application.
Use ProcessIdToSessionID function to find the session ID of the destinaion process. To get the process ID of the destination process you need to search for the process by name (use CreateToolhelp32Snapshot() Windows API function to enumerate processes and get their names). If your destination process is a service, you can use an alternative (easier way) to get the process ID: use OpenService to get the service handle, then use QueryServiceStatusEx() function to obtain the service status information which includes process ID.