Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / November 2005

Tip: Looking for answers? Try searching our database.

Creating and using mixed assemblies

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Colin Desmond - 19 Nov 2005 23:26 GMT
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
Maxwell - 23 Nov 2005 02:36 GMT
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/default.asp?url=/library/en-us/vcmex/html/vcco
nConvertingManagedExtensionsForCProjectsFromPureIntermediateLanguageToMixedMode.
asp


and

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmex/html/vcgr
fconvertingmanagedextensionsforcprojectsfrommixed-modetopureil.asp

Colin Desmond - 23 Nov 2005 09:34 GMT
> I just ran in to the opposite issue, using std::set in a Managed C++
> lib...still trying to figure that out.
[quoted text clipped - 8 lines]
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmex/html/vcgr
fconvertingmanagedextensionsforcprojectsfrommixed-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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.