C# vs. C++

  • Thread starter Thread starter GTi
  • Start date Start date
G

GTi

My planes is to migrate my C/C++ project to C# and dotnet.
In my project I use dynamically loaded plug-ins into my program.
So how is this done in C# ?
C# equals to LoadLibrary and GetProcAddress.

Sorry for asking if it is a easy question...
 
You can alwasy use LoadLibrary/GetProcAddress in managed code as well.
But you shouldnt do it that way. .NET api provides reflection which can
be used to locate a specific predefined type. It also provides api to
create a type at run time.

Here are examples of plugins:

http://www.codeproject.com/csharp/extensibleui.asp
http://msdn.microsoft.com/msdnmag/issues/03/10/Plug-Ins/
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnas...

http://www.divil.co.uk/net/articles/plugins/plugins.asp
 
While it's true you can use LoadLibrary/GetProcAddress to load native DLL's
, you can't use these API's to load/call managed assemblies/methods.

Willy.
 
Back
Top