PC Review


Reply
Thread Tools Rate Thread

Dynamic loading DLL files

 
 
Arek
Guest
Posts: n/a
 
      17th Feb 2008
Hi,

I'm porting application from C++ to C#. This application has several plugins
(DLL files). All plugins are using same interface (IPlugin) and have
function which returns pointer to this interface. App checks specified
folder on start, loads all DLL files into memory and creates collection of
this pointers (IPlugin).
How to do it in C#? How to load perform dynamic load DLL library in C#? How
to retrieve an interface?

Thanks,
Arek

 
Reply With Quote
 
 
 
 
Family Tree Mike
Guest
Posts: n/a
 
      17th Feb 2008
You will want to use Assembly.LoadFromFile(), then reflection to determine
classes implimenting the interface.

"Arek" wrote:

> Hi,
>
> I'm porting application from C++ to C#. This application has several plugins
> (DLL files). All plugins are using same interface (IPlugin) and have
> function which returns pointer to this interface. App checks specified
> folder on start, loads all DLL files into memory and creates collection of
> this pointers (IPlugin).
> How to do it in C#? How to load perform dynamic load DLL library in C#? How
> to retrieve an interface?
>
> Thanks,
> Arek
>
>

 
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
Restore Kernel32.dll dnsapi.dll powrprof.dll and wininet.dll Durward Rogers Windows XP Security 1 12th Dec 2009 11:27 PM
Re: The Logon User Interface DLL Msgina.dll failed to load. Contactyour system administrator to replace DLL or restore the original DLL. John John (MVP) Windows XP Help 0 9th May 2008 05:55 PM
dynamic DLL loading Pohihihi Microsoft C# .NET 2 12th Aug 2005 10:07 PM
RE: shadow copying / dynamic dll loading =?Utf-8?B?Y2hvcm5iZQ==?= Microsoft Dot NET Framework 1 29th Apr 2004 06:23 AM
Dynamic dll loading and PInvoke Andrea Palmieri Microsoft C# .NET 2 20th Sep 2003 04:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:39 AM.