Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Functions in the Framework Library

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The Framework Library was created to help make writing XLLs easier. It includes simple functions for managing XLOPER/XLOPER12 memory, creating temporary XLOPER/XLOPER12, robustly calling the Microsoft Office Excel callback functions (Excel4, Excel4v, Excel12, Excel12v) and printing debugging strings on an attached terminal.

The functions included in this library help simplify a piece of code that looks like the following.

XLOPER12 xMissing, xBool;
xMissing.xltype = xltypeMissing;
xBool.xltype = xltypeBool;
xBool.val.xbool = 0;
Excel12(xlcDisplay, 0, 2, (LPXLOPER12) &xMissing, (LPXLOPER12) &xBool);

The simplified code looks like the following example.

Excel12f(xlcDisplay, 0, 2, TempMissing12(), TempBool12(0));

The following functions are included in the Framework library:

debugPrintf

GetTempMemory

FreeAllTempMemory

InitFramework

QuitFramework

Use of these functions shortens the amount of time required to write a DLL or XLL. Starting development from the sample application GENERIC also shortens development time. Use GENERIC.C as a template to help set up the framework of an XLL, and then replace the existing code with your own.

The temporary XLOPER/XLOPER12 functions create XLOPER/XLOPER12 values by using memory from a local heap managed by the Framework library. The XLOPER/XLOPER12 values remain valid until you call the FreeAllTempMemory function or either of the Excel or Excel12f functions. (The Excel and Excel12f functions free all temporary memory before returning.)

To use the Framework library functions, you must include the FRAMEWRK.H file in your C code and add the FRAMEWRK.C or FRMWRK32.LIB files to your code project.

Show:
© 2015 Microsoft