Forum Discussion
FICO
4 years agoCommunity Manager
Mosel does not see a DSO module provided by a C++ application - could Windows security be the problem?
We have an old C++ application that uses Xpress optimizer internally. It works by calling Mosel using `XPRMrunmod()`. In addition, it uses callbacks defined in the C++ application via `XPRMdsofct`, ...
FICO
4 years agoCommunity Manager
Dear Susanne,
thank you for your suggestions.
I believe that the customer may be running a version of the code that did not check return value of `XPRMregstatdso`, so I sent them an updated version and asked them to test it. (By the way, you write that the return value can be helpful for analysis, but the documentation states that XPRMregstatdso() returns 1 on fail - is the documentation wrong?)
I am also worried about Xpress versions, since they often run an older version of Xpress (I do not know why), but I have check the code on my machine and it works even with Xpress 8.6.
Moreover, they have an old version of the same application and that works - I do no understand why: the new version is a major revision, but it changed mainly database handling...
By the way, this is the sequence of calls in the code:
XPRMinit() // stops if not 0
XPRMregstatdso("gassopt", gassopt_init) // stops if not 0
XPRMsetdefstream(NULL, XPRM_F_WRITE+XPRM_F_LINBUF, outfile) // warns if > 0
XPRMsetdefstream(NULL, XPRM_F_ERROR+XPRM_F_LINBUF, outfile) // warns if > 0
XPRMcompmod("g", mosname, bimname, "GassOptTKL compiled") // stops if not 0
model = XPRMloadmod(bimname, NULL);where `gassopt_init() is defined as`
int CVisBeregning::gassopt_init(XPRMnifct nifct, int *interver, int *libver, XPRMdsointer **interf)
{
mm = nifct;
*interver = XPRM_NIVERS; /* The interface version we are using */
*libver = XPRM_MKVER(0, 1, 0); /* The version of the module: 0.1.0 */
*interf = &dsointer; /* Our interface */
return 0;
}Do you see anything suspicious or missing there?