Give Us a Call: +1-877-99-BOPUP

IServerClient::Initialize method

Initializes the IServerClient class and puts necessary variables used by the object. This method must be called before calls of all other methods of the IServerClient interface.

HRESULT Initialize(     LPSTR lpszServerAddress,     WORD wServerPort,     BYTE iClientType,     LPSTR lpszCustomBuild,     LPDWORD pParentHwnd,     LPDWORD lpdwExtendedCode, );

Parameters

lpszServerAddress
[in] Pointer to a null-terminated text buffer that contains the name or address of the IM server. Size of the buffer must not exceed 255 symbols of length. The address can be IP address or DNS name of a computer.
wServerPort
[in] WORD variable that specifies TCP/IP port on the IM server to connect to. Set this parameter to 0 value to use default port.
iClientType
[in] Type of the messaging client. Depending on this parameter the IM server performs or does not some operations, data delivery, etc. This parameter can be one of the following values:
CLIENT_TYPE_MESSENGER_SDK
Indicates a full-featured client which can send and receive instant messages, operate with contacts, groups, etc.
CLIENT_TYPE_OBSERVER_SDK
Indicates a one-way messenger client that can only receive messages. Operations with contacts and groups are not allowed.
lpszCustomBuild
[in] Pointer to a null-terminated text buffer that contains a custom build number of the instant messaging client. This parameter is optional and used to identify an application between others that are built on same version of the SDK. In that case the custom build is appended to version number of the SDK that is shown on the IM server. Set this parameter to NULL value in order to do not use any custom build number for the application.
pParentHwnd
[in] Pointer to a handle of the window that should receive all notifications and messages sent from the IM server. This parameter cannot be NULL.
lpdwExtendedCode
[out] Pointer to a DWORD variable that gets an extended code if error result is returned. For available codes see Available Extended Codes topic.

Return Value

S_OK
The function was successful.
E_INVALIDARG
One or more arguments are incorrect.
E_FAIL
Some error occurred in the function. Check lpdwExtendedCode variable to get extended information on the error.