473,395 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Creating and using mixed assemblies

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
Nov 19 '05 #1
2 1420
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/de...oMixedMode.asp

and

http://msdn.microsoft.com/library/de...detopureil.asp

Nov 23 '05 #2


"Maxwell" wrote:
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/de...oMixedMode.asp

and

http://msdn.microsoft.com/library/de...detopureil.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.
Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: F-13 | last post by:
I'm working on a BOM in Access 200 from an example downloaded from from the web. The sample database contains three tables, Assemblies (the list of items needed to assemble any assembly),...
21
by: Sharon | last post by:
I wish to build a framework for our developers that will include a singleton pattern. But it can not be a base class because it has a private constructor and therefore can be inherit. I thought...
8
by: Bern McCarty | last post by:
Is it at all possible to leverage mixed-mode assemblies from AppDomains other than the default AppDomain? Is there any means at all of doing this? Mixed-mode is incredibly convenient, but if I...
3
by: Steve McLellan | last post by:
Hi, Sorry for the long post, it's a bit epic (and sums up the last 10 hours of my life, apart from my car's gearbox melting). We've got a mixed C++ assembly that's exhibiting odd behaviour...
1
by: Colin Desmond | last post by:
I have a dll assembly compiler with the /clr flag as it contains ref classes and traditional style C++ classes. I want to write unit tests for the ref classes in that assembly. VS2005 allows me...
7
by: Boni | last post by:
Dear all, I have a global variable in the native code. I was assuming that I create a IJW CLI wrapper class and create an instance of this class in other appdomain, then the global variables will...
1
by: bvisscher | last post by:
I posted this recently in microsoft.public.vc.language and was redirected here. I also searched this ng and found some relavant threads. The most relavent I found was: ...
6
by: AG | last post by:
I am working on a web app using both C# and VB. Yes, there is a reason for it. All the code behind is C#. In the web.config I have the following <compilation debug="true">...
7
by: =?Utf-8?B?SmltIFdhbHNo?= | last post by:
I'm new to working with mixed assemblies. All of my previous experience has been with VC++/MFC in native, unmanaged applications. When I create a mixed assembly in which one or more of the files...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.