didou
asked on
Compilation problem....
I am getting the following compile error:
C:\Working\jnli\ocx\Jnli_o cxCtl.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::NLGetVariab le(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(_b str_t(vari ableName)) ;
const char* buff = (const char*) result;
return stringCopy(buff);
}
Any quick ideas?
C:\Working\jnli\ocx\Jnli_o
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
The offending code is:
BSTR CJnli_ocxCtrl::NLGetVariab
{
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(_b
const char* buff = (const char*) result;
return stringCopy(buff);
}
Any quick ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.