473,406 Members | 2,259 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,406 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 1296
"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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.