|
MXAddConnectCallBack |
C
NetProg Library |
|
#include
"mx.h"
|
|
|
int MXAddConnectCallBack (MX* pmx, char*
connectionclassname, BYTE mode, int (*funct)(MXCom* pcom, void* applicationfield), void* applicationfield) |
|
Parameters |
Description |
pmx |
the
MX manager |
connectionclassname |
the
connection class name |
mode |
the
mode that triggers the callback |
funct |
the
function to call when a connection is closed or opened |
applicationfield |
Programmer-specified
data sent to the callback function |
This function adds
a callback to a connection class comclass. The callback is triggered when a
connection instance
belonging to connectionclassname is opened or closed. If an error occurs on a
connection belonging to the connection class connectionclassname the connection is
automatically closed by MX manager and the callback of the ONCLOSED mode
is called
The mode parmeter can be : MXONCONNECT, MXONCLOSE
applicationfield specifies
the argument that is to be passed to the specified procedure when it is invoked
Return
Values : if error
-1 else returns a value > 0
|
|
|