Called by the framework when the XLL is loaded into memory
virtual BOOL InitInstance( ); |
TRUE if the function completes successfully; FALSE otherwise.
This method is called whenever the XLL is loaded into memory. Note that this can occur not only when the XLL is loaded, but also whenever the XLL is examined in Excel's Tools/AddIns dialog.
Cheap initialization tasks should be done here. In particular, the following must be done:
The code generated by the XLL+ AppWizard includes code for all these tasks.
In the MFC builds, CXllApp is descended from CWinApp. Calling the base class InitInstance ensures that the MFC implementation is properly initialized.
Header: xllplus.h
CXllApp Class | CXllApp Methods | CXllApp::ExitInstance | CXllApp::OnXllOpenEx()