The answer (thanks Igor) was to change VTS_VARIANT to VTS_PVARIANT in the dispatch map. I got confused because the comment for VTS_VARIANT in afxdisp.h says "'const VARIANT&' or 'VARIANT*'".