IfmManage::PostMessageToApp

This method posts a message to a running application.

Syntax

HRESULT PostMessageToApp( long uMsg, long wParam, long lParam );

Parameters

uMsg
Specifies the message identifier.
wParam
Long integer that contains the wParam of the message.
lParam
Long integer that contains the lParam of the message.

Return Values

NOERROR indicates success. If an error occurs, the appropriate HRESULT value is returned.

Remarks

This method provides a simple way to conduct communication between applications. To use PostMessageToApp, both applications must have the message name defined in a common header file. Both the client and server application must invoke RegisterWindowMessage to register the message name. To receive messages, the server application must call IfmManage::RegisterStartedApplication, with the message name as the third parameter. Any message with this name that is posted by the client application with PostMessageToApp is sent to the server’s event sinks.

If speed is important, memory-mapped files are a much faster way to implement interprocess communication.

See Also

IfmManage::RegisterStartedApplication