XLL+ Class Library

MyUpper Example

This example shows how create a CXlOper return value from a string.

// Function:    MyUpper
// Returns:     LPXLOPER
// Description: Returns the input string converted to upper-case

//{{XLP_SRC(MyUpper)
    // NOTE - the FunctionWizard will add and remove mapping code here.
    //    DO NOT EDIT what you see in these blocks of generated code!
IMPLEMENT_XLLFN2(MyUpper, "RC", "MyUpper", "Input", "User Defined"
    "", "Returns the input string converted to upper-case", 
    "Input string\000", "\0", 1)

extern "C" __declspec( dllexport )
LPXLOPER MyUpper(const char* pszInput)
{
    CXlOper xloResult;
//}}XLP_SRC

    CString stIn(pszInput);
    stIn.MakeUpper();
    xloResult = stIn; 
    return xloResult.Ret();
}

Uses

CXlOper::CXlOper