lgo_OpenProtocol()
Reserve system resources for a communication service.
#include "laygo.h" LCid lgo_OpenProtocol ( LProtocol protocol, LMajorId major, LMinorId minor );
protocol | id of protocol to open |
major | id of major device |
minor | id of minor device |
lgo_OpenProtocol() reserves the system resources required for a communication session using the given protocol. Its functionality is identical to that of lgo_Open() except that it does not use the service database.
If a CID returned by lgo_OpenProtocol() is detached, a new one can be obtained by calling lgo_AttachProtocol() with the same parameters given to lgo_OpenProtocol().
If successful, lgo_OpenProtocol() returns a non-negative connection identifier (CID) which uniquely identifies the connection during subsequent transactions. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
LCid cid; if ((cid = lgo_OpenProtocol(lgo_PROTOCOL_X21_BIS, 0, 0) < 0) { return (FAILURE); }