XLL+ Class Library (6.3)

HandleAPI Sample

Contains the code for the HandleAPI sample in the User Guide

Status

The code in this add-in demonstrates the old hand-written mechanism for creating and maintaining object handles. All this functionality can be achieved without coding, using one of the handles extensions as described in the User Guide topic Using object handles.

For an up-to-date handle sample, see the NumericHandleDemo sample, which was written using the NumericHandles.xpe extension.

Remarks

This project demonstrates the use of object handles in an XLL+ add-in.

For more details see Object handles using pointers in the User Guide.

Classes and functions used

CXllApp::SetSinkEvents | CXllApp::SetComEventHandler | CXlFormulaRefresh::RefreshAllWorkbooks | CXlFormulaRefresh::RefreshWorkbook | CXlHandleStore<T, S> | CXlHandleStore<T, S>::ObjectFromHandle | CXlHandleStore<T, S>::AddObjectHandle | CXlHandleStore<T, S>::Clear | ::XllGetTypedApp

Sample project

Each sample project is located in a sub-directory of the Samples directory of the XLL+ installation. To use the sample project, open the solution file HandleAPI.sln or the project file HandleAPI.vcproj.

You can enable debugging under Excel by using the Setup Debugging command in the XLL+ ToolWindow.

When delivered, the help files are excluded from the build. You can enable the help build by selecting the files HandleAPI.help.xml and HandleAPI.chm in the Solution Explorer, and using the right-click menu to view Properties. Select the page "Configuration Properties/General" and set the "Excluded from build" property to "No". See Generating help in the User Guide for more information.

See Also

List of Sample Projects | Object handles using pointers