Quiz: Exporting C++ to Excel via the XLL SDK

Module 8 of 8 · Medium

Quick Quiz

1. An XLL function is registered with the type string `"QQ"`. What does this mean?

2. Memory allocated with `new` inside an XLL function and returned as the `lparray` of an `XLOPER12` will be automatically freed by Excel after the formula evaluation completes.

3. In `xlAutoOpen`, you register a function with argument count `11` after `xlfRegister`. The actual number of `Excel12f` arguments after `xlfRegister` is 12 (the DLL handle + 10 registration strings). What happens if you pass `12` instead of `11`?

4. You export a Black-Scholes pricing function `xBSCall(S, K, r, T, sigma)` as type `"BBBBBB"`. A trader enters `=xBSCall(A1, B1, 0.05, 1, C1)` where `A1` contains text. What does Excel pass to your function?

5. A colleague builds an XLL and loads it in 32-bit Excel. It crashes immediately. The same XLL loads fine in 64-bit Excel. What is the most likely cause?

6. An XLL function declared with thread type `"1"` (single-threaded) can safely be called from a cell in a workbook that has Multi-Threaded Recalculation (MTR) enabled.