Usage of DLOpen

Last Updated : Aug 03, 2015 |

You can use the DLOpen() routine to connect to an IP Office system.

Parameters

  • pbxh: A number used to identify the system. This user-supplied parameter must remain consistent across all calls to DevLink.

  • pbx_address: The IP address of the IP Office You can either use an IP address or a host name. You can set this address to 255.255.255.255 for DevLink to make a network broadcast to locate the system unit. Only the first unit to respond is connected. To connect to multiple system units, you must specify the IP address or host name of each unit.

  • pbx_password: The password of the IP Office system.

  • reserved1: This parameter should be set to Null, or nil in Delphi.

  • reserved2: This parameter should be set to Null, or nil in Delphi.

  • cb: The address of a callback function for sending connection status events. This parameter is mandatory.

Return value

This routine may return either 0 (DEVLINK_SUCCESS) or 1 (DEVLINK_UNSPECIFIEDFAIL).

Note:

A return value of DEVLINK_SUCCESS only indicates that communications with the unit have been initiated. The subsequent connection fails for several reasons. Further information is provided to the CommsEvent callback function specified in the cb parameter.

C / C++

LONG PASCAL DLOpen( LONG pbxh , TEXT * pbx_address , TEXT * pbx_password , TEXT * reserved1 , TEXT * reserved2 , CommsEvent cb );

Delphi

function DLOpen(pbxh: LongInt; pbx_address: PChar; pbx_password: PChar; reserved1: PChar; reserved2: PChar; cb: TCommsEvent): LongInt; stdcall;