Click here to Skip to main content
15,887,302 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
:thumbsup:I've written Excel C API code for simple functions in VS2010.
I also using Interactive Brokers C++ Posix API, which I can compile in VS2008 and not VS2010.

I fill a data structure with a call to a VS2008 dll around Interactive Brokers C++ Posix API. If I pass in std::deque< std::deque<_variant_t> > it works fine from VS2008 exe. However, I get a run-time memory error from VS2010 dll that is also my XLL.

When I debug from my XLL code in Visual Studio 10.0, I get the error
("_Pdeque != 0 && ((_Mydeque *)_Pdeque)->Myoff <= _Off && _Off <= (((_MyDeque*)_Pdeque)->_Myoff+((_Mydeque*)_Pdeque)->_Mysize)", 0)
from deque file in Visual Studio 9.0.

Could this be an error related to different representations of std::deque or _variant_t in VS2008 MFC and native VS2010? Is there any way around this problem other than recreating my projects in Visual Studio 2008?

I also wanted to mention that I use a template class that utilizes .NET threads in CLR projects and native threads in native projects. This also could be related. I created a standalone Visual Studio 2008 XLL just for Interactive Brokers and it no longer crashes. However, the socket disconnects... I also changed my Excel C API usage to a macro instead of a function and turned off all of my user interface customization in the Excel C API code.

Any idea what the problem may be? My guess is a very intricate memory error... I do not think it is related to the template class since the definitions are all in header files and I haven't had problems using the class with different multi-threading techniques in different types of projects.
Posted
Updated 19-Oct-10 19:32pm
v5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900