Hi,
according to the LAPI documentation (9.7.0), when calling
LLSTATUS LL_SessionAllocEx(
LPLLSESSION newSession,
LLCSTR server,
LLLONG port,
LLCSTR connection,
LLCSTR userName,
LLCSTR userPassword,
LLVALUE config);
the newSession argument returns a Session handle.
However, if one of the parameters is wrong, for example server, it will return some error, (IE LL_E_COULDNOTCONNECT) but it still has a newSession handle. The problem, here is that one cannot call LL_SessionFree, using newSession as the argument, because the Session was never really created. And if you try another error will happen.
Did anyone came across this problem? Any ideas for the solution. If a handle was allocated, even though no session was created, can this cause memory leaks? Can we "nullify" the Session handle?
Any thoughts?
according to the LAPI documentation (9.7.0), when calling
LLSTATUS LL_SessionAllocEx(
LPLLSESSION newSession,
LLCSTR server,
LLLONG port,
LLCSTR connection,
LLCSTR userName,
LLCSTR userPassword,
LLVALUE config);
the newSession argument returns a Session handle.
However, if one of the parameters is wrong, for example server, it will return some error, (IE LL_E_COULDNOTCONNECT) but it still has a newSession handle. The problem, here is that one cannot call LL_SessionFree, using newSession as the argument, because the Session was never really created. And if you try another error will happen.
Did anyone came across this problem? Any ideas for the solution. If a handle was allocated, even though no session was created, can this cause memory leaks? Can we "nullify" the Session handle?
Any thoughts?