473,325 Members | 2,860 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,325 software developers and data experts.

Create DLL, import in main application

Hi!

I have a main application here and developed 2 modules as DLL files,
which will be updated from time to time.
The main application ships without the modules so i want to be able, to
put the module DLLs in application folder and call them from the main
application.

My question: is it possible to use my modules like that? The DLL files
would have a determined format like company.modulename.dll and the start
function could have the same name in all modules. Is there any way?

If necessary I could write an XML file which contains all module names
and the names of it dll files to load them into the main application.

Please help!

Thanks,
Andy
Sep 23 '05 #1
1 1292
"Andy" <an*******@zwickau-net.de> wrote in message
news:ew**************@TK2MSFTNGP12.phx.gbl...
I have a main application here and developed 2 modules as DLL files, which
will be updated from time to time.
The main application ships without the modules so i want to be able, to
put the module DLLs in application folder and call them from the main
application.

My question: is it possible to use my modules like that? The DLL files
would have a determined format like company.modulename.dll and the start
function could have the same name in all modules. Is there any way?


Yes. It is not the easiest thing in the world to do. Here is a _sketch_ of
one way to go: You can use

Reflection::Assembly::LoadFrom()

to load the DLLs.

If each of your DLLs has a class derived from a known base, for each of the
assemblies loaded above you could use

Assembly::GetTypes().

For each of the types (classes) in your assemblies you could use

Type::BaseType

to determine the base class. If that base class is the one that contains
your function, you could use

Type::GetMethod()

to get information about the function and then

MethodInfo::Invoke()

to call it.

Regards,
Will

P.S. I have used MC++ syntax (::) to separate namespace, class and method
names
Sep 23 '05 #2

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

Similar topics

17
by: Lonnie Princehouse | last post by:
In short: Is there any way to run Python WITHOUT trying to create .pyc files (or ..pyo) or to have Python not attempt to import the .pyc files it finds? Reason: We have a site-specific...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
1
by: Andy | last post by:
Hi! I have a main application here and developed 2 modules as DLL files, which will be updated from time to time. The main application ships without the modules so i want to be able, to put the...
3
by: 100grand | last post by:
Modify the Inventory Program to use a GUI. The GUI should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price...
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...
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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.