473,804 Members | 3,932 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2194
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.co m

"Eric" <no************ ****@yahoo.se> wrote in message
news:11******** **************@ j33g2000cwa.goo glegroups.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.goo glegroups.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.mach in AT dot.state.fl.us > wrote
in message news:e2******** ******@TK2MSFTN GP14.phx.gbl...
| Hi,
|
| "Eric" <no************ ****@yahoo.se> wrote in message
| news:11******** **************@ j33g2000cwa.goo glegroups.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
982
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
3389
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 example below. 1-) Adding "Unknown" to a reference table is bad. Doing so effectively changes the Nullability option of every FK that references the table to a NULLable FK relation. 2-) Simply adding a "Not Known/Undetermined" value to the...
2
8675
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 table names are unknown. 5. Unknown number of tables in database. For example:
0
2228
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. Both designate an 8-bit encoding where *nothing* is known about its characters. Especially, unknown-8bit is *not* necessarily a superset of US-ASCII. Wouldn't it be useful (e.g. for certain HTML documents) to have a charset parameter that is "half...
5
20449
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 to the test server it won't work at all. Looks like aspnet_wp is trying to compile it for five seconds, then it stops working what so ever. The system event log gets the following entry: Application popup: aspnet_wp.exe - Application Error : The...
9
10752
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 as a valid return value for the typeof operator in a later version of ECMAScript or is this a JScript "feature"? -- Klaus Johannes Rusch
5
13696
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 this: <mytag style='display:none'> <h3>Hello</h3>
1
4589
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" java.lang.NullPointerException at test$myFreakingListener.actionPerformed(test.java:34) at java.awt.Button.processActionEvent(Unknown Source) at java.awt.Button.processEvent(Unknown Source)
2
7398
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) <Error/3Unknown Directive type "toctree" (2) (ERROR/3) Unknown interpreted text role "ref".
4
4039
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 and open an unknown workbook that contains the data that I need to imput into my current workbook, once the unknown workbook is opened it should automatically select my range (number of columns known, but number of rows unknown- the number of rows...
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10577
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...
1
10320
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,...
0
10077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7620
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
6853
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
5521
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...
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.