PC Review


Reply
Thread Tools Rate Thread

call managed/unmanaged classes from unmanaged code

 
 
bonk
Guest
Posts: n/a
 
      29th Sep 2005
Hello,

I am trying to create a c++ dll or lib (not COM) that contains a little
bit of managed code and a lot of unmanged code using c++/CLI. Basically
some classes rely on managed bits internally. But nothing of that
managed stuff will be exposed to the outside. The user of that dll is
suppsed to "see" only plain unmanaged c++ classes so that if he uses
that dll he does not have to compile his code using that /CLR switch.

Do you think something like that is possible? If so, how ?
Or will I have to use COM if I want create and use dlls that also
contain managed code ?
 
Reply With Quote
 
 
 
 
Marcus Heege
Guest
Posts: n/a
 
      1st Oct 2005
It is possible.

Issues I am aware of (OTOMH):
* somewhat increased load times
* __declspec(appdomain) variables are initialized when the CLR is loaded (by
the module .cctor) - don't access them earlier

If you face other issues, let me know.

Marcus Heege

"bonk" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> I am trying to create a c++ dll or lib (not COM) that contains a little
> bit of managed code and a lot of unmanged code using c++/CLI. Basically
> some classes rely on managed bits internally. But nothing of that managed
> stuff will be exposed to the outside. The user of that dll is suppsed to
> "see" only plain unmanaged c++ classes so that if he uses that dll he does
> not have to compile his code using that /CLR switch.
>
> Do you think something like that is possible? If so, how ?
> Or will I have to use COM if I want create and use dlls that also contain
> managed code ?



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access violation in unmanaged code: Linking managed with unmanaged static libs Pixel.to.life Microsoft VC .NET 3 23rd Jul 2007 04:16 AM
Call managed code from unmanaged Yoavo Microsoft Dot NET Framework 1 3rd Oct 2006 04:21 PM
RE: COM interop - to call a managed code from unmanaged C++ =?Utf-8?B?U2Ft?= Microsoft VC .NET 0 18th May 2004 11:01 AM
Re: COM interop - to call a managed code from unmanaged C++ Carl Daniel [VC++ MVP] Microsoft VC .NET 2 17th May 2004 05:41 PM
What's the best way to make a managed .dll that uses unmanaged classes and code? 0to60 Microsoft VC .NET 4 14th Nov 2003 02:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:05 PM.