Visual Studio debugging experts...

Community Forums/General Help/Visual Studio debugging experts...

col(Posted 2013) [#1]
Hi all,

It's a bit complicated so I'll dive straight in at the deep end...

I'm creating an app thats written in 'Max. Its uses a LOT of COM but max can handle COM with no problems. I've written a .dll that serves COM via Visual Studio. My app uses the correct functions via COM and gives me an instance of my class from the .dll.

When I run the app as a stand alone exe or even from the 'Max editor I get an EAV at the same place which is passing my new returned c++ object into another Extern'd c++ COM object.

So to help debugging the dll I run my main app from 'Studio and now the whole app runs perfectly ok. So now I'm thinking that there an issue with scope and/or the msvcrt.

I appreciate its a bit vague but the project is working great until this little hiccup and I think it might be a c++ runtime issue?

All c++ objects are creating in the heap using the new operator so I would have thought everything should be ok so far.

Has anyone else had experiences of something silimar ??

Cheers!!


Brucey(Posted 2013) [#2]
As long as the same DLL is creating/destroying the C++ objects, you should generally be fine.

Dunno how things apply when you are pushing things between different DLLs though. Assuming they've all been built with the same headers, expected structures would be the same size.


col(Posted 2013) [#3]
Hi Brucey,

Theres only the one .dll that serves for me and I'm only getting an using one instance of my COM object in 'Max. I think the main clue (for me at least ) is that it runs ok in 'Studio but not when run outside of it. This is what makes me think its a runtime issue?

EDIT when I say c++ objects I mean a new c++ class instance.


col(Posted 2013) [#4]
Lol. I found the problem. I was returning the instance as the wrong type!

Cheers.