Creating and using mixed assemblies

G

Guest

I have a non-MFC DLL in my legacy application and now I want to add some
managed code inside one of its classes (not exposing any managed code/classes
to the unmanaged application). I have performed the following tasks:

On the DLL:
set the /clr flag
marked it has having no entry point /NOENTRY
and forced a symbol reference __DllMainCRTStartup@12
performed a complete rebuild

The DLL compiles and in release mode runs fine, but in debug I get an
assertion at

_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle()
{ ASSERT(afxCurrentResourceHandle != NULL);
return afxCurrentResourceHandle; }
in afxwin1.inl.

I am using a full version of VS2005.

Is there anything else I need to do to the DLL or something for the .exe in
order to allow it to run in debug mode?

Many thanks

Colin
 
G

Guest

Maxwell said:
I just ran in to the opposite issue, using std::set in a Managed C++
lib...still trying to figure that out.

I'n not sure this really applies to your question but in my quest to
figure out how to use std::set in my managed code I ran accross this
article, have you check these out yet?


http://msdn.microsoft.com/library/d...tsFromPureIntermediateLanguageToMixedMode.asp

and

http://msdn.microsoft.com/library/d...ensionsforcprojectsfrommixed-modetopureil.asp

Thanks for this information Maxwell, unfortunately I don't think it really
applies as my DLL's don't contain DLLMain methods and are being consumed by a
/clr compiled executable.

Good luck with your problem and I'll keep looking.

Colin.
 

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