Rufen Sie uns an: +1-877-99-BOPUP

Notifications

Notifications are the messages that sent to a parent window of the IM client application and notify about any events initiated by the IM server. Notifications deliver information on incoming and forwarded instant messages, changes in the user's Contact List, adding/removing assigned messaging groups, changing group permissions, etc. The handle to the window of the application that should receive these notifications is set through the IServerClientVBA::Initialize function call.

Notifications are sent in the form of NOTIFY_SERVER_MESSAGE message.

Constants below are defined in CSClient4.bas module which is installed as a part of Bopup IM Client SDK and available at \include sub-folder in installation root directory. That module must be imported to a VBA project in order to properly call IServerClientVBA interface methods. To import the module open VBA project and right-click on Modules in the project left tree, then browse and select the file. The module will be added to the project itself and not as a reference to an external file so there are no needs to copy the module file if you wish to distribute a macro to another computers.

Public Function WindowProc (ByVal wnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long

Parameters

wnd
Handle to a destination window. It should be passed as parameter to IServerClientVBA::Initialize method on initializing interface and point to a form handle that will receive notifications from the IM server.
msg
Identifier of the message that is always equal NOTIFY_SERVER_MESSAGE.
wParam
Identifier of the notification message. See available notification messages in the table below.
lParam
Contains additional information and data depending on the notification message.

Return Value

The return value is ignored and must be set 0 except for notification messages that specify otherwise.

Notification Messages passed through wParam variable

AccountPasswordResetNotifies the IM client application current user's password has been reset on the IM server.
ContactStatusNotifies the IM client application some user's presence status from the Contact List and/or group contacts has been changed.
ContactListAddedNotifies the IM client application that new contacts are available to current user on the IM server.
ContactListChangedNotifies the IM client application that the list of contacts available to current user on the IM server has been changed.
ContactListNeedsToBeRebuiltNotifies the IM client application that the user's contacts have been reset due to major changes in the users structure on the IM server.
ContactListRebuiltNotifies the IM client application that the user's contacts have been rebuilt on the IM server and must be received again.
GroupAddedNotifies the IM client application that current user has been added (assigned) to specified messaging group.
GroupChangedNotifies the IM client application that assigned messaging group has been renamed and/or it's permissions have been changed.
GroupRemovedNotifies the IM client application that current user has been removed (unassigned) from specified messaging group.
MessageTypingEventNotifies the IM client application that remote user is typing a message.
NewMessageNotifies the IM client application on a new incoming instant message.
SessionClosedNotifies the IM client application that the connection with the IM server has been lost and the session has been closed. This can be a result of network issues or the IM server forcefully closes the session.
SessionClosedAsExistingNotifies the IM client application that the connection with the IM server has been automatically interrupted and the session has been closed. This can be a result of another connection to the IM server made under the same user account.
SessionPingPongNotifies the IM client application that the IM server checks a live status of the application. The IM client may bypass this notification message.

Example

Public Function WindowProc(ByVal wnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long     If msg = WM_NOTIFY_SERVER Then         Select Case wParam             Case SessionPingPong         End Select     End If     WindowProc = 0 End Function