mfc dll calling clr?

D

dave

I have an mfc dll that is loaded dynamically from a main mfc app. Using vs
2008. I would like to add the capability to use the LINQ to XML functionality
from .net 3.5 in it. when i change just the option in the project
properties to add clr support it appears that the constructor for a static
instance of a class is not being called which then breaks my initialization
sequence. am i missing something in the setup? or is there some better way
to do this from an mfc dll to read and write xml??
 
D

dave

Ok, i got it to build and run by limiting clr support to 2 cpp files in the
project. I can write xml using linq to xml from data in my main program, so
all the data connections seem ok. One annoyance now is that the debugger
won't let me step from the native to the managed code within the dll. I can
stop at the call to the function in the managed code but it won't step in,
and breakpoints in the managed code disable themselves. I have changed the
debugger from auto to mixed with no effect. the message on the breakpoint
says no executable code is associated with it maybe because of preprocessor
directors or compile/link options... but which ones might do this??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top