XLL+ Class Library (6.3)

Step 2 - Insert AvgOptDataCache

Insert AvgOptDataCache

Add an instance of AvgOptDataCache to the class definition in AvgOpt.h, and include the file that contains the class definition, data_avgopt.h:

CopyC++
...
#include <xlserialize.h> 
#include <xlmenu.h> 
#include "data_avgopt.h"
...

class CAvgOptApp : public CXllApp
{
public:
    CAvgOptApp();

// Names 
public:
    static LPCSTR m_pszDefName;

// Data 
    AvgOptDataCache m_cacheAvgOpt;

// Operations                     
    void ClearCache();             
 
// Menu
    CXlMenu m_menu;

    ...
};

This declaration creates a single instance of the specialized cache class. We will be adding code to the add-in function later to "wire it up".

Next: Step 3 - Add a worker thread >>