By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,677 Members | 1,361 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,677 IT Pros & Developers. It's quick & easy.

Create Instance from external DLL

P: n/a
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
Share this Question
Share on Google+
39 Replies


P: n/a
* "Quick Fox" <qu********@hotmail.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

P: n/a
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

P: n/a
Cor
Hi Fergus,
And what is the meaning of this message?
Cor
Nov 20 '05 #4

P: n/a
Cor
I took bablefish, I got it
Nov 20 '05 #5

P: n/a
* 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

P: n/a
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

P: n/a
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

P: n/a
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.language".

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

P: n/a
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

P: n/a
Hi Cor,

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

So you did. OE and the newsgroup is still being a bit wierd then. I saw
your 1:09pm message but not the 1:10pm one. ??

|| I think that we have to remember, that probably for the most
|| visitors at this newsgroup, English is not there major language

I've come to think that for the most visitors it <is> and that this is, in
fact, an English newsgroup, even if doesn't have 'en' in the name. Microsoft
is an American company. Many, if not most, of the assisters are native Englih
speaking. And there <are> regional newsgroups for other languages, (even if
English seems to be used a lot in them too!!).

|| 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.

Times change. There was time whan an English gentleman who could not speak
French was not considered civilised. Earlier still, an Englishman who couldn't
speak Norse was at a severe disadvantage in much of the country. The lack of
other languages of many English people is not because of an attitude that
English is the only language (though it may look like it ) but because the
disadvantage of not speaking these other languages is not strong enough to
warrant the effort. Times will change again.

The reason I made my point to Herfried, has little to do with attitudes or
anything, maybe it's even less about language than it may seem*1. It's purely
pragmatic. Many one-language people are intimidated by the sight of another.
It's just one of those basic human nature things - some people yes, some
people no, some people in-between depending on this, that and the other
(Gaussian distribution).

Herfried is here, I believe, because he get's a big kick out of helping
people. To give someone help which they may reject is simply to reduce the
percentages*1, that's all. Some people <will> fail to get the help because of
a lack of guidance*2. Herfried has said that that's up to them. And fair
enough. He helps many, many people. If he 'loses' those who fail to 'put the
effort in' it's a loss that he can afford - there's good vibes aplenty from
the others. I understand, too, an attitude that says "I'm working hard to help
you people, I expect you to make your contribution too". I have it myself at
times and I think "if you can't be bothered, why should I?". That's fair
enough too, for we are only mortals, even if some have achieved MVM*3 status!!
;-)

|| 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?

Which topic was this one?

Regards,
Fergus

*1 It's more about human nature and statistics.

*2 Whether the percentage is low or too-low-to-care-about is not one that I
can judge.

*3 Most Valued Mortals. www.mvms.org ;-))
Nov 20 '05 #11

P: n/a
Cor
Hi Fergus,

You only did take my introduction. Did you see the major points too?

Because you write so many things in your introduction, that I try to explain
in the end, am I doubting why you did not give comments on that part?

You know I don't get angry on you? I know you too do it like me only to get
more knowlegde from arguing.

The subject, I was looking for that because I did want to paste in the text
by value, but could not find it.
;-)
Cor

Nov 20 '05 #12

P: n/a
Howdy Cor,

|| You know I don't get angry on you? I know you too do it
|| like me only to get more knowlegde from arguing.

Oh yes. ;-))

|| You only did take my introduction. Did you see the major
|| points too?
||
|| Because you write so many things in your introduction, that I
|| try to explain in the end, am I doubting why you did not give
|| comments on that part?

You said a lot in your post, as I did in mine. Which bits did I leave out
that you would have liked a response to?

These are the paragraphs.
|| 1 Before you read this, you have to know
|| 2 I think that we have to remember, that
|| 3 You have to know, that non native English
|| 4 Don't think it are only English speaking
|| 5 Strange is that with Spanish and Italian
|| 6 What I write is not about you and most
|| 7 Therefore I think we can see that extra
|| 8 I have seen you helping someone in probably

Regards,
Fergus
Nov 20 '05 #13

P: n/a
Cor
Hi Fergus,

By reference 7

By value
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.language".

This I found nice to discuss, I think that the most non native English
speakers agree, but I am curious about a native English speaker.

Cor
Nov 20 '05 #14

P: n/a
Hi Cor,

Lol. I was hoping it wouldn't be #7. I said nothing because I didn't know
what to say.

I make suggestions to Herfried, sometimes strongly. On that 'other issue'
I pushed hard. On this one I won't. But it's still always Herfried's choice
what he does, regardless of how I may feel about it. Any changes that he makes
are his.

I think I covered 'EN' - dotnet.languages.vb (en). ;-)

Cheers,
Fergus

ps. Herfried, I hope it amuses you more than anything else to have us
nattering on about you like this. ;-)
Nov 20 '05 #15

P: n/a
Cor
Hi Fergus,

I think I covered 'EN' - dotnet.languages.vb (en). ;-)

I understand you wanted to say that Microsoft is only for English speaking
people?
:-))
Your turn
Cor

Nov 20 '05 #16

P: n/a
Hi Cor,

|| I understand you wanted to say that
|| Microsoft is only for English speaking people?

Oh no, far from it. Microsoft is for everyone, everywhere - whether they
want it or not - just give it a bit more time. ;-)

No, I mean this newsgroup - it's for English speaking people of any
nationality.

Next.? ;-))

Regards,
Fergus
Nov 20 '05 #17

P: n/a
Cor
Hi Fergus,
Not bad reply, but I think I got the answer,

Do you mean for native English speaking people or a group for all people who
try to communicate using English as an interface (that I call always your
favorite subject in this newsgroup) which makes it posible to communicate,
while in fact the communicators does'nt have to know more of English than
what is necessary to communicate, but what does not restrict them to know
more of that and each other and if it is better go beside that interface (I
am glad that you wrote something like this a while ago)?
Cor
Nov 20 '05 #18

P: n/a
* "Cor" <no*@non.com> scripsit:
(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.


There are few Chinese web sites, but I found some really useful code on
them VB Classic code commented in Chinese.

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

P: n/a
* "Fergus Cooney" <fi******@tesco.net> scripsit:
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..
I think links will be shown as links in Chines web pages too. I never
had problems (I do _not_ speak Chinese).
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.
;-)


:-)

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

P: n/a
* "Fergus Cooney" <fi******@tesco.net> scripsit:
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
I will add a link to Google's translation feature in the next release
(still working on it).
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).
The license agreement is written in English.

:-)
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. ;-)


I often post links to English language ressources in the German groups,
but nobody complained about the fact that the pages were written in an
other language and the source was not commented in German. I think
that somebody who isn't lazy will try to get information even on a
non-German/English webpage.

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

P: n/a
* "Cor" <no*@non.com> scripsit:
I took bablefish, I got it


:-)

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

P: n/a
* "Fergus Cooney" <fi******@tesco.net> scripsit:
Es ist auf Deutsch. Die Leute hier kann nicht verstehen Deutsch (for the
most part).
The code is written in VB.NET, there are many translators available for
free. I won't do any extra work only because some people are lazy.
The chances are pretty high that they'll take one look, say "What the
F*ck??!!", and move on.


People who think like this don't want to get an answer.

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

P: n/a
* "Fergus Cooney" <fi******@tesco.net> scripsit:
I make suggestions to Herfried, sometimes strongly. On that 'other issue'
I pushed hard. On this one I won't. But it's still always Herfried's choice
what he does, regardless of how I may feel about it. Any changes that he makes
are his.
I don't have enough time to maintain more than one version of the
content. I will never provide C# versions and I will never provide
English language comments.
I think I covered 'EN' - dotnet.languages.vb (en). ;-)
There is no ".en".
ps. Herfried, I hope it amuses you more than anything else to have us
nattering on about you like this. ;-)


I really like the discussion, but it's very OT.

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

P: n/a
* "Fergus Cooney" <fi******@tesco.net> scripsit:
No, I mean this newsgroup - it's for English speaking people of any
nationality.


Where did you take this information from?

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

P: n/a
* "Cor" <no*@non.com> scripsit:
I think I covered 'EN' - dotnet.languages.vb (en). ;-)


I understand you wanted to say that Microsoft is only for English speaking
people?


Microsoft doesn't have special groups for English speaking people.

SCNR

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

P: n/a
Cor
Herfried,

I really like the discussion, but it's very OT.


On Topic Herfried, we started this thread about the way we have to behave us
in this newsgroup and that is always a On topic.
And if you read it from top till end it is all mixed up with Visual Basic
Language

Cor
Nov 20 '05 #27

P: n/a
* "Cor" <no*@non.com> scripsit:
I really like the discussion, but it's very OT.


On Topic Herfried, we started this thread about the way we have to behave us
in this newsgroup and that is always a On topic.
And if you read it from top till end it is all mixed up with Visual Basic
Language


I read the whole thread and IMO most of it is OT.

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

P: n/a
Hi Herfried,

|| Where did you take this information from?

From my brain. Sometimes it makes the most startling deductions!!

Regards,
Fergus
Nov 20 '05 #29

P: n/a
Hi Herfried,

|| There is no ".en".

Did someone say there was?? I missed that bit.

Regards,
Fergus
Nov 20 '05 #30

P: n/a
* "Fergus Cooney" <fi******@tesco.net> scripsit:
Where did you take this information from?


From my brain. Sometimes it makes the most startling deductions!!


:-)))

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

P: n/a
* "Fergus Cooney" <fi******@tesco.net> scripsit:
There is no ".en".


Did someone say there was?? I missed that bit.


Maybe I misunderstood you...

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

P: n/a
Hi Herfried,

|| I will add a link to Google's translation feature in
|| the next release

|| (still working on it).

So's Google. Long way to go yet.

|| The license agreement is written in English.

LOL.

|| I often post links to English language ressources in the
|| German groups,

Where there's a surprisingly (to me) high degree of English spoken.

|| but nobody complained about the fact that the pages
|| were written in an other language

As I've mentioned in other threads, most people don't complain - they just
don't come back.

|| 'lazy'

That's a judgement that may be wide of the mark. There are other reasons
for not doing something - such as the fear* factor that I mentioned. You are
bi-lingual (at least/near enough/for the purposes of comparison/etc). I doubt
whether you'd understand this fear that I'm trying to describe. But then
again, maybe you would.

I think you understand how many VBers wouldn't want to examine C# code
because it's so 'foreign' - yet we both know that underneath the syntax
differences, they have much in common - especially when the code is mainly
concerned with Framework utilisation.

This C# type 'fear' also occurs with the natural languages but with these
it is magnified**. [Other people have this fear with equations and will skip
right over them when reading a book, however innocuous they might be. Others
have it with poetry.]

Regards,
Fergus

* 'Fear' is perhaps too strong a word. I use it in the sense of discomfort at
encountering something which can't be understood - the unknown/unknowable is
somethig to fear. Or, at least, to be moved away from.

** Like most human issues - for <some> people.
Nov 20 '05 #33

P: n/a
Hi Cor,

|| the communicators don't have to know more of
|| English than is necessary to communicate,

We've see plenty of that in both language and typing skills.

|| English speaking people <of any nationality>

Yes - English as an interface (and a very flexible one at that!).

But it would be interesting to see what would happen if a query came here
in a foreign language.

In the vb.winapi there <was> one such topic. The amazing thing is that
someone actually responded to it. See for yourself [http://tinyurl.com/qi1y].
For some reason the full thread isn't there but the missing posts are included
in the ones that <are> there.

Cheers,
Fergus

[Repost - the first one (10:15pm) went to non@non by mistake.]
Nov 20 '05 #34

P: n/a
Sort of. I was saying that it was implied.
Nov 20 '05 #35

P: n/a
* "Fergus Cooney" <fi******@tesco.net> scripsit:
But it would be interesting to see what would happen if a query came here
in a foreign language.


If there is a special group available for the OP's language, I will
redirect him/her to this group. IMO that's the best solution.

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

P: n/a
* "Fergus Cooney" <fi******@tesco.net> scripsit:
I will add a link to Google's translation feature in
the next release
(still working on it).


So's Google. Long way to go yet.


Update is finished, but I didn't have enough time to include the
translation feature yet.
I often post links to English language ressources in the
German groups,


Where there's a surprisingly (to me) high degree of English spoken.


You are right, most of the Germans speak English, but most of them don't
understand a lot. When reading your posts I don't understand every word.
but nobody complained about the fact that the pages
were written in an other language


As I've mentioned in other threads, most people don't complain - they just
don't come back.


I think if somebody _really_ wants an answer, he will ask for an
explanation of the code. But I remember I already mentioned that.

'lazy'


That's a judgement that may be wide of the mark. There are other reasons
for not doing something - such as the fear* factor that I mentioned. You are
bi-lingual (at least/near enough/for the purposes of comparison/etc). I doubt
whether you'd understand this fear that I'm trying to describe. But then
again, maybe you would.

I think you understand how many VBers wouldn't want to examine C# code
because it's so 'foreign' - yet we both know that underneath the syntax
differences, they have much in common - especially when the code is mainly
concerned with Framework utilisation.


I understand what you mean. From my own experience I can tell you that
I never ignored things I didn't understand. I tried to understand
them. Sometimes it's hard, but there are lots of people here who are
willing to help.
This C# type 'fear' also occurs with the natural languages but with these
it is magnified**. [Other people have this fear with equations and will skip
right over them when reading a book, however innocuous they might be. Others
have it with poetry.]


I don't understand people who have a C# fear. When posting a question
which is related to .NET programming, a solution in every .NET language
will be helpful (if it doesn't make use of features included in a
specific .NET programming language only).

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

P: n/a
Hi Herfried,

|| I don't understand people who have a C# fear

Mm, I was hoping, but I'm not that surprised.

Regards,
Fergus
Nov 20 '05 #38

P: n/a
Cor
Hi Herfried,
Did you know there is a special newsgroup for German speaking people
de.entwickler.dotnet.vb

No Herfried, redirecting people who ask in this group gives me immidiatly
the idea of a ghetto when you do it in that way, they do it not for nothing
in this group, like the spanish talking man who said, the spanish group is
bad.

Only when someone ask something in non English, than it can be maybe an
alternative.
And then only if you know that he too is using a Visual.Studio.Net in that
language and he is asking in that language.

My last message in this thread

Cor
Nov 20 '05 #39

P: n/a
* "Cor" <no*@non.com> scripsit:
Did you know there is a special newsgroup for German speaking people
de.entwickler.dotnet.vb
I know this group... I remember I saw you there some weeks ago...
No Herfried, redirecting people who ask in this group gives me immidiatly
the idea of a ghetto when you do it in that way, they do it not for nothing
in this group, like the spanish talking man who said, the spanish group is
bad.
Redirecting makes sense if the OP doesn't know that a group in his/her
language exists. Very often the OP will have a better chance to get an
answer in the group for his language.
Only when someone ask something in non English, than it can be maybe an
alternative.
I am only talking about this case.
And then only if you know that he too is using a Visual.Studio.Net in that
language and he is asking in that language.

My last message in this thread


ACK.

EOT

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

This discussion thread is closed

Replies have been disabled for this discussion.