473,327 Members | 2,065 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

use unknown dll

Hi, I wonder if it is possible to import and use an unknown dll in a C#
program? I.e. get to know what public variables, methods, properties
etc. the dll contains and get to know what parameters to call the
methods with, what the properties return etc. Does it have to be a .net
dll?

Thanks!

Mar 13 '06 #1
3 2169
Eric,

Well, you can use reflection for .NET dlls, but this isn't the
recommended way to handle unknown dlls. Typically, you will want types in
dlls (in a known location) to implement an interface, then create instances
of those types and cast to the interface.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Eric" <no****************@yahoo.se> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
Hi, I wonder if it is possible to import and use an unknown dll in a C#
program? I.e. get to know what public variables, methods, properties
etc. the dll contains and get to know what parameters to call the
methods with, what the properties return etc. Does it have to be a .net
dll?

Thanks!

Mar 13 '06 #2
Hi,

"Eric" <no****************@yahoo.se> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
Hi, I wonder if it is possible to import and use an unknown dll in a C#
program? I.e. get to know what public variables, methods, properties
etc. the dll contains and get to know what parameters to call the
methods with, what the properties return etc. Does it have to be a .net
dll?


It's a .net it's much easier , you can use reflection to know about all the
types the dll defines.

What are you trying to do?

Are you trying to implement plug ins ?
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Mar 13 '06 #3

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:e2**************@TK2MSFTNGP14.phx.gbl...
| Hi,
|
| "Eric" <no****************@yahoo.se> wrote in message
| news:11**********************@j33g2000cwa.googlegr oups.com...
| > Hi, I wonder if it is possible to import and use an unknown dll in a C#
| > program? I.e. get to know what public variables, methods, properties
| > etc. the dll contains and get to know what parameters to call the
| > methods with, what the properties return etc. Does it have to be a .net
| > dll?
|
| It's a .net it's much easier , you can use reflection to know about all
the
| types the dll defines.
|
| What are you trying to do?
|
| Are you trying to implement plug ins ?
|
|
| --
| Ignacio Machin,
| ignacio.machin AT dot.state.fl.us
| Florida Department Of Transportation
|
|

I'm affraid he's talking about non .NET DLL's, notice it's last sentence...
"Does it have to be a .net dll?"
Willy.
Mar 13 '06 #4

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

Similar topics

0
by: Eugen Walcher | last post by:
Hello All, I'm getting this error in my error_log in apache. Can anyone offer any assistance in fixing the problem? I'm using RH 9 with apache 2.0.53 and PHP v4.3.11
3
by: Marcus | last post by:
I'm running into a situation that has me adding a value of "Unknown" to a reference table. I am being pulled between two trains of thought, and was curious to get other's input on in. I give an...
2
by: Amy | last post by:
This is what I want to do: 1. Delete all tables in database with table names that ends with a number. 2. Leave all other tables in tact. 3. Table names are unknown. 4. Numbers attached to...
0
by: Andreas Prilop | last post by:
http://www.iana.org/assignments/character-sets and RFC 1428 have an encoding (charset) "unknown-8bit". There is also the widely recognized "x-user-defined", which means the same thing, afaik....
5
by: Lars-Erik Aabech | last post by:
Hi! Guess it's my day again.. Tried to deploy a test release of a new asp.net web today, and got a terrible error. The web is running swell on three development computers, but when it's copied...
9
by: Klaus Johannes Rusch | last post by:
IE7 returns "unknown" instead of "undefined" when querying the type of an unknown property of an object, for example document.write(typeof window.missingproperty); Has "unknown" been defined...
5
by: fjanon | last post by:
Hi, I went through the HTML spec without finding the description of what the browsers behavior should/must be regarding tags or attributes they don't understand. I did a quick experiment like...
1
by: tactech | last post by:
Hello Can somebody help me and tell me why I can’t change the background color of the second PN2 panel. I get this error about unknown source Exception in thread "AWT-EventQueue-1"...
2
by: Calvin Cheng | last post by:
Hi, I am attempting to convert a bunch of .txt files into html using the docutils package. It works for most of the txt files except for the index.txt file which gives 2 errors: (1)...
4
by: omono84 | last post by:
I know that this should be rather simple but i seem to be missing a step to get it to work. and have been unable to find a solution on the net. The aim is that I click on the open button to find...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.