XLL+ Class Library

AvgOptAsync Sample

Overview

This add-in contains a calculator for calculating the value of a complex option. The code is based on the single-threaded sample AvgOpt.

The calculation of the option value is very slow (since it uses a Monte-Carlo algorithm) and it may therefore be worthwhile running the calculation in a background thread. Excel remains fully available and responsive while the calculations run.

The spreadsheet is only updated when a calculation has finished, and the results are available. Until the calculation completes, the result #WAIT! is displayed.

Details

Full details of this sample are contained in the User Guide.

Functions used

CXlOper::Ret
CXlMenu
CXlMenu::SetTexts
CXlMenu::AddItem
CXlMenu::Create
CXlMenu::Destroy
CXllApp::WinMessageBox
::XllGetTypedApp

Project files

If you are using MS Developer Studio 6, then you should open the project file AvgOpt.dsp.

If you are using MS Visual Studio .NET 2002, then you should open the solution file AvgOpt.sln or the project file AvgOpt.vcproj.

If you are using MS Visual Studio .NET 2003, then you should open the solution file AvgOpt71.sln or the project file AvgOpt71.vcproj.

If you are using MS Visual Studio 2005, then you should open the solution file AvgOpt8.sln or the project file AvgOpt8.vcproj.

See Also

List of Sample Projects | Samples and Walkthroughs