Demonstrates the use of RTD handles to represent objects in Excel
This add-in contains the code described in the User Guide topic Using object handles.
It contains three sets of add-in functions, each of which
consists of a creator function (e.g. Thing.Create
),
which creates an object and returns it to Excel as a handle, and
3 "getter" functions, which return properties of the object
(e.g. Thing.Value
).
The three sets of functions demonstrate different handle techniques:
Object | Functions | Description |
---|---|---|
|
Thing.Create |
The simple case: a Thing object is created, and is returned as a handle. |
|
CachedThing.Create |
The creator function See Combining handles with other features in the User Guide for more details. |
|
CustomThing.Create |
A custom formatter class See Custom handles formats in the User Guide for more details. |
To edit the functions in this add-in, you need to load the extension file
RtdHandles.xpe
.
See Loading an extension file
for instructions.
You should also make sure that none of the following extension files is loaded, since the various types of handles are mutually exclusive.
NumericHandles.xpe
StringHandles.xpe
StringPtrHandles.xpe
psl::CreateHandleInCache | CHandleFormatter<T>
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 RtdHandleDemo.sln or the project file RtdHandleDemo.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
RtdHandleDemo.help.xml
and
RtdHandleDemo.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.
List of Sample Projects | Using object handles | NumericHandleDemo sample | StringHandleDemo sample | StringPtrHandleDemo sample