XLL+ Class Library (6.3)

CXllApp::ExitInstance

Called by the framework when the XLL is unloaded from memory

virtual int ExitInstance( );

Return Value

0 if the function completes successfully; non-zero otherwise.

Remarks

This method is called whenever the XLL is finally unloaded from memory. Note that this can occur not only when Excel is closed, but also whenever the XLL is examined in Excel's Tools/AddIns dialog.

Final termination tasks can be done here. If the method is used, then it must call the base class method CXllApp::ExitInstance().

In general it is better to place all termination code in CXllApp::OnXllClose.

MFC considerations

In the MFC builds, CXllApp is descended from CWinApp. Calling the base class ExitInstance ensures that the MFC implementation is properly cleaned up.

Requirements

Header: xllplus.h

See Also

CXllApp Class | CXllApp Methods | CXllApp::InitInstance() | CXllApp::OnXllClose()