Link to home
Start Free TrialLog in
Avatar of didou
didou

asked on

Compilation problem....

I am getting the following compile error:

C:\Working\jnli\ocx\Jnli_ocxCtl.cpp(284) : error C2664: 'NLGetVariable' : cannot convert parameter 1 from 'class CString' to 'unsigned short ** '
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

The offending code is:

BSTR CJnli_ocxCtrl::NLGetVariable(BSTR FAR* variableName)
{
      CString variable = *variableName;
      CString foo = NLGetVariable(variable);
      return foo.AllocSysString();
}

And the problem pointer points to line "CSTring foo = NLGetVariable(variable);"

The NLGetVariable to the right of the “=” in that line is pointing to an included dll, and the function in that dll is defined as:

const char* NLGetVariable(const char* variableName)
{
      _bstr_t result = parsers[0]->getVariable(_bstr_t(variableName));
      const char* buff = (const char*) result;
      return stringCopy(buff);
}

Any quick ideas?
ASKER CERTIFIED SOLUTION
Avatar of appleby
appleby

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial