WinSetSynchroMode
Appearance
This function is intended for use in a distributed application.
Syntax
WinSetSynchroMode(hab, lMode)
Parameters
- hab (HAB) - Input
- Anchor-block handle.
- lMode (LONG) - Input
- Synchronization mode.
- SSM_SYNCHRONOUS
- Synchronous mode.
- SSM_ASYNCHRONOUS
- Asynchronous mode.
- SSM_MIXED
- Mixed mode.
- rc (BOOL) - Returns
- TRUE for successful completion, FALSE for error.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE
- Successful completion
- FALSE
- Error occurred.
Remarks
This function allows an application with a distributed message queue to synchronize the processing of those messages. This is achieved through the MsgControlHook hook, which is invoked by this function.
Example Code
#define INCL_WINMESSAGEMGR /* Or use INCL_WIN, INCL_PM, Also in COMMON section */ #include <os2.h> HAB hab; /* Anchor-block handle. */ LONG lMode; /* Synchronization mode. */ BOOL rc; /* Success indicator. */ rc = WinSetSynchroMode(hab, lMode);
This example sets the synchronization mode to synchronous.
#define INCL_WINMESSAGEMGR #include <OS2.H> HAB hab; WinSetSynchroMode(hab, SSM_SYNCHRONOUS); /* synchronous mode. */
Related Functions
- WinBroadcastMsg
- WinCreateMsgQueue
- WinDestroyMsgQueue
- WinDispatchMsg
- WinGetDlgMsg
- WinGetMsg
- WinInSendMsg
- WinPeekMsg
- WinPostMsg
- WinPostQueueMsg
- WinQueryMsgPos
- WinQueryMsgTime
- WinQueryQueueInfo
- WinQueryQueueStatus
- WinSendDlgItemMsg
- WinSendMsg
- WinSetClassMsgInterest
- WinSetMsgInterest
- WinSetMsgMode
- WinWaitMsg