XLL+ Class Library (6.3)

CXllApp::PrefixFunctions() Example

This example causes each function in the XLL to be exported with John Smith's initials as a prefix. Thus his function "Delta" will now be available in Excel as "JSDelta".

Note that only the only change to the boilerplate version of this function (generated by the AppWizard) was the addition of the PrefixFunctions() method.

CopyC++
BOOL CTest1App::InitInstance() 
{
    // Call the base class 
    if ( !CXllApp::InitInstance() )
        return FALSE;

    // Set the name of the library to the default value
    m_stName = m_pszDefName;

    // Add the statically defined function specifications
    AddStaticFns();

    // Prefix each function with "JS"
    PrefixFunctions("JS");

    return TRUE;
}

Uses

CXllApp::PrefixFunctions