Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hii all.
can any one help me.
what is managed dll.how it is used in native c++ code
Posted

This article may help you
Manage dll[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 12-Mar-11 1:21am    
I say! My 5.
--SA
[no name] 12-Mar-11 1:23am    
Thank you.
Sergey Alexandrovich Kryukov 12-Mar-11 1:27am    
There was another Question here; it was specifically asked for managed + unmanaged in one file; I voted 5 for that. Did you see it? You could also answer to that question, I guess...
--SA
[no name] 12-Mar-11 1:34am    
You can have a C++/CLI DLL that uses MFC classes internally. One nice advantage to mixed-mode DLL creation with C++/CLI is that you can use native C++ just about anywhere within the DLL (following the C++/CLI rules) and "it just works".
I'm afraid, if you don't know what's managed, my Answer can hardly help you. Also, if you have no clue, your second Question is premature: you will hardly understand any Answers before you're really comfortable with both managed and unmanaged without trying to use managed DLL in unmanaged code (the other way around is much, much easier but still by far not trivial). OK, managed DLL is the library written for .NET platform. On .NET, there are no really DLLs and EXE in exact same sense as Windows DLLs. For .NET this is just common file name extensions, with DLLs used as libraries. More fundamentally, executables in .NET form something called assemblies which use each other during development and run-time as well. The code is called managed because of memory managements based on Garbage Collection. Better now?

Again, consider all this only as a set of key words; you would need to do your search and spend a lot of time on each concept. Learning .NET is something like learning yes another operating systems of a very different type plus a conceptually new language.

Now, using in native C++ code…

It is a know notion that this is not possible, or only possible via COM. Another way is using the new C++ dialect called C++/CLI (actually this language is the ECMA standard).
This is one more solution (based on standards). Please see my Answer to this Question: loading C# DLL in MFC[^].

—SA
 
Share this answer
 
v2
Comments
[no name] 12-Mar-11 1:28am    
Woh!nice answer
Take my 5+
Sergey Alexandrovich Kryukov 12-Mar-11 14:52pm    
Thank you, Santosh,
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900