473,721 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Create Instance from external DLL

Hi All,

Please help for following case:
How to Load a Assembly from DLL file and create instance
of the class in the loaded file.

I want make a function that get 2 string parameters
(Assembly file Name and Class Name) and create a instance.

Thanks

Quick Fox
Nov 20 '05 #1
39 2105
* "Quick Fox" <qu********@hot mail.com> scripsit:
How to Load a Assembly from DLL file and create instance
of the class in the loaded file.

I want make a function that get 2 string parameters
(Assembly file Name and Class Name) and create a instance.


<http://www.mvps.org/dotnet/dotnet/samples/codingtechnique/>
-> "PlugIns"

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Hi Herfried,

Es ist auf Deutsch. Die Leute hier kann nicht verstehen Deutsch (for the
most part).

The chances are pretty high that they'll take one look, say "What the
F*ck??!!", and move on.

What do you think?

Regards,
Fergus
Nov 20 '05 #3
Cor
Hi Fergus,
And what is the meaning of this message?
Cor
Nov 20 '05 #4
Cor
I took bablefish, I got it
Nov 20 '05 #5
* Fergus Cooney schrieb:
Es ist auf Deutsch. Die Leute hier kann nicht verstehen Deutsch (for the
most part).

The chances are pretty high that they'll take one look, say "What the
F*ck??!!", and move on.

What do you think?


If somebody really wants an answer, the german text and comments won't
be the problem. If I find a solution to my problem on a _Chinese_ web
page, I will still try to understand it.

--
Herfried K. Wagner
Microsoft MVP
<http://www.mvps.org/dotnet>

Nov 20 '05 #6
Hi Cor,

Herfried often gives links to his part of the mvps.org site. This presents
the visitor with a pageful of German, which most people can't understand, of
course. They then have to navigate to another page of German which explains
the particular topic. Then they have to download a zip of a project, which
presumably is in German as well. (It may not be of course, but it's a
reasonable assumption).

I'm suggesting that most people would run a mile before going through all
that.

When I give links to palmbytes.de, I always give people instructions to
ignore the German and download the project. And I tell them that the project
itself is in English. This way they won't be 'frightened off' before they get
to the useful bit.

Perhaps Herfried could add the same reassurances to his file of links
where they refer to German web pages/sites. Perhaps not. ;-)

Regards,
Fergus
Nov 20 '05 #7
Cor
Herfried,

I think you did a while like Fergus said and not because he had asked that.
If somebody really wants an answer, the german text and comments won't
be the problem. If I find a solution to my problem on a _Chinese_ web
page, I will still try to understand it.


And of course like mostly we agree, (and believe that I have stuffed
sentences who did make that more clear) but I think that little sentence
would not be that difficult for your new connector.

(Can you really get things from Chinese web sites, that I never could).
I don't believe you, I think only when it are webs with some translations in
latin characters.

Cor

Nov 20 '05 #8
Cor
Hi Fergus,

A minute after that I wrote my answer "I got it" and did send that.

But let's make a nice discussion about behaviour in this newsgroup.

Before you read this, you have to know that I did first make a message to
Herfried wherein I asked him to do what you asked. Not because I fully
agree, but because it is so few extra work to put that extra sentence (I did
this, because I have probably the same feeling about this as Herfried, but
on the other hand think to understand why you ask it).

I think that we have to remember, that probably for the most visitors at
this newsgroup, English is not there major language. They use it and that is
normal, because the program language is too basically in English.

You have to know, that non native English speaking people, sometimes become
a little bit sad about English speaking people, who only know that language
and are thinking that they are speaking the language of the world, while it
is not. To be honest, we measure them about that.

Don't think it are only English speaking people, we in Holland see it often,
the same is with a lot of people from Germany and from France.

Strange is that with Spanish and Italian speaking people it is not. While
Italian is in Europe as much spoken as English and French and I thought
Spanish is Worldwide more spoken than English.

What I write is not about you and most other native speaking English
visitors to this newsgroup and expressly not the regulars.

Therefore I think we can see that extra attention from Herfried (when he
does it) only to be for those who only speak English and have no alternative
for another newsgroup than this, because there is no special EN language
newsgroup for "dotnet.vb.lang uage".

I have seen you helping someone in probably strange language for you, about
a script, for a woman. Did you know what language you were writing?

Cor.



Nov 20 '05 #9
Hi Herfried,

Lol. That's fair enough. I wouldn't be discouraged myself - if the link
and program, name are readable - but I think that Chinese may be stretching it
a bit far - I don't know the Chinese for 'download' so I'd probably miss the
link..

There will be some people who wonder why you give them German, but that's
their tough luck. If they think you're being unhelpful, that's their delusion.
;-)

Regards,
Fergus
Nov 20 '05 #10

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

Similar topics

3
4349
by: Carlo Chung | last post by:
Hi, I have a question about how to retrieve the information of the calling instance, such as instance name, in an external C procedure. Thank you, Carlo Chung
15
3331
by: Viviana Vc | last post by:
How can I programatically do the equivalent of the following: cacls "C:\Program Files\test" /T /G Everyone:f ? Thanks, Viv
8
3191
by: Steve Neill | last post by:
Can anyone suggest how to create an arbitrary object at runtime WITHOUT using the deprecated eval() function. The eval() method works ok (see below), but is not ideal. function Client() { } Client.prototype.fullname = "John Smith"; var s = "Client"; eval("var o = new " + s + "();"); alert(o.fullname);
0
1150
by: Markus Stehle | last post by:
Hi all! I need to create an soap envelope that will be sent to an external service using HTTP POST. I created the required classes which are serialized using XmlSerializer. The envelope should look like this: <Envelope xmlns="http://www.w3.org/2001/12/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/12/soap-envelope soap-envelope.xsd">
4
2036
by: slaks | last post by:
During runtime i need to load some dll. Assembly.LoadFile works ok, but when i invoke CreateInstance on some type from this dll it throws me exception because my type depends on dll's which are in the same directory. My question is : how can i create instance when it depends on external dlls which the systems can not locate. Thanks Slava.
9
1328
by: John Salerno | last post by:
Let's pretend I'm creating an Employee class, which I will later subclass for more specific jobs. Each instance will have stuff like a name, title, degrees held, etc. etc. So I'm wondering, is the best way to get all this information into the object to just have a really long __init__ method that takes each argument? Does a question like this depend on how the class will be used? I'm trying to construct it in a way that is independent...
9
3452
by: Grant Schenck | last post by:
Hello, I have a base class with several derived classes: ScriptBase + ScriptCallInbound + ScriptCallOutbound I then have another class: Line
0
1259
by: Beta | last post by:
Does anyone know how to close an embedded word document in C# application without closing an external Word document? The issue is the external Word Document share the same instance (winword.exe) as the embedded application in C#. When the program application get close, the External word Document got close as well. Is there a way to prevent the external word document being close when the program application is close?
1
2082
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
Hi This is from within an EXE that actaully contains the class - No external assembly I would do Class1 myClass = new Class1(); Now I want
0
8840
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9367
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9215
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9131
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5981
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4484
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4753
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.