| RemoveWindowsMessage Method | |
| See Also Example |
- messageType
- The Windows message type, defined in BoWindowsMessageType.
- toProcess
- Indicates whether SAP Business One is to process the messages or not. If true, SAP Business One processes the messages; otherwise, SAP Business One discards them.
This method enables you to deal with extreme scenarios. When an add-on needs to take a long time to process a UI API event, it prevents SAP Business One from processing the Windows message queue. Consequently, the message queue overflows, and if the add-on performs any other call back to SAP Business One via COM, it causes a system RPC failure.
| Visual Basic |
|---|
Public Sub RemoveWindowsMessage( _
ByVal messageType As BoWindowsMessageType, _
ByVal toProcess As Boolean _
) |
- messageType
The Windows message type, defined in BoWindowsMessageType.Value Description bo_WM_TIMER Represents the WM_TIMER message type of the Windows system. - toProcess
- Indicates whether SAP Business One is to process the messages or not. If true, SAP Business One processes the messages; otherwise, SAP Business One discards them.
If your add-on needs to do heavy work in handler procedure of an SAP Business One event, we recommend that you call this method per minute. Otherwise, you might get errors like "System call failed. (Exception from HRESULT: 0x80010100 (RPC_E_SYS_CALL_FAILED))". This may occurs on a non-server edition Windows system (for example, Windows 7 and Windows XP) due to the post message limit of the Windows system.
| Using the RemoveWindowsMessage method (C#) | Copy Code | |
|---|---|---|
| ||