The ActiveX component I am using successfully calls my event sink.

I get the value:

LPDISPATCH lpDispQuoteValue = V_DISPATCH(&varlValue);

I then try to use the MFC Visual Studio wizard generated class (from typelib).

CQuote quote(lpDispQuoteValue)

If I let it run through debugger normally I get:

First-chance exception at 0x02480183 in ... 0xC0000005: Access violation reading location 0x524b3629.

But, if I step through the code one line at a time it works.

Any idea why?

Thanks