//{{XLP_SRC(OperCastToBoolExample)
// NOTE - the FunctionWizard will add and remove mapping code here.
// DO NOT EDIT what you see in these blocks of generated code!
IMPLEMENT_XLLFN2(OperCastToBoolExample, "RP", "OperCastToBoolExam"
"ple", "Arg1", "Example", "Demonstrates casting a COper to a"
" BOOL", "Argument 1\000", "\0", 1)
extern "C" __declspec( dllexport )
LPXLOPER OperCastToBoolExample(const COper* lpopArg1)
{
CXlOper xloResult;
//}}XLP_SRC
BOOL bOk = TRUE;
COper& opArg1 = *(COper*)lpopArg1;
// These two lines could have condensed to one:
// xloResult = (BOOL)opArg1;
BOOL b = opArg1;
xloResult = b;
return xloResult.Ret();
}
Uses
COper::operator BOOL