XLL+ Class Library

MySquare Example

This example shows a very basic add-in function.

// Function:    MySquare
// Returns:     double
// Description: Returns the square of the input

//{{XLP_SRC(MySquare)
    // NOTE - the FunctionWizard will add and remove mapping code here.
    //    DO NOT EDIT what you see in these blocks of generated code!
IMPLEMENT_XLLFN2(MySquare, "BB", "MySquare", "Input", "User Defin"
    "ed", "Returns the square of the input", "Number whose square"
    " is to be returned\000", "\0", 1)

extern "C" __declspec( dllexport )
double MySquare(double dInput)
{
//}}XLP_SRC

    return dInput * dInput;
}

Uses

::IMPLEMENT_XLLFN2