473,399 Members | 4,177 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,399 software developers and data experts.

Dynamic linking, using DLLs

hi

i have a question about how to arrange linkage between a "framework"
executable and an extensible set of "applet"s in DLLs that plug into the
executable.

the main exe is an application for managing interactions between "applets"
which live in the dlls. the main exe offers communications between the
applets, and also certain services that the applets can make use of. the
question is, how to offer these services to the dlls. they can be offered in
at least three ways, as follows. (i) offer them as exports from service.dll,
which ships with the executable. service.lib and service.h are offered so
that applets can be built against the service DLL. (ii) offer a dummy
service.dll which holds only stubs for these service functions, and at
startup arrange global variables in service.dll so they call up into the
executable. (iii) offer function pointers in service.dll, and at startup
initialise them to point at functions that are, in fact, exported from the
exe.

the services offered require integration across the applets, so it is not
possible to do (i), i.e. to compute them entirely within a service dll. the
other two solutions work, but both have inelegance and inefficiency
(additional call per function call in ii, or additional dereference step in
iii).

so i wondered if it is possible to offer the API as just a header file
(declarations), and have the dlls linked at run-time by the loader to these
functions (definitions) that are actually exported *from the executable*. as
a side benefit, a service DLL is actually unnecessary (it reduces to merely a
header file, and maybe a lib, though that isn't necessary either, really),
reducing the complexity of the solution.

that is, something like:

DLL <====EXE <====DLL

where both the exe can call the dll's exports, and vice versa.

the DLLs will be written in C or C++, depending on the taste of the client.
the exe is written in C++. all exports would be with C linkage, undecorated.
this is a cross-platform application, but it will be a start to establish
whether this is possible in windows.

thanks in advance
Jun 27 '08 #1
0 903

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

Similar topics

0
by: Dibyendu Roy | last post by:
Hi All, I build an object called "dblorcle" to connect to oracle database in Sun solaris box. This is built linking with various oracle ".a" (archived, for static linking) files come with standard...
3
by: K.S.Liang | last post by:
Hi all, 1> If there are more than one dynamic linking libraries in the file system, how do I know which one is loaded into system? Any C library or system call can tell me which *.so or *.sl is...
5
by: Joerg M. Colberg | last post by:
My apologies if this is a trivial problem. I have been trying to solve this for a few days now and I just can't get it done. Here's what I have. I have a C++ project in VisualStudio.NET whose code...
2
by: Joerg M. Colberg | last post by:
I have a VS.Net solution that contains various projects. Some of the projects contain programme blocks (legacy code) that are used by some of the other projects. One project contains some C code...
0
by: mumin via DotNetMonster.com | last post by:
All, quick question about assemblies. If someone uses another .NET assembly in a . NET program, is the first program considered "dynamically linked" into the new program? Of course the...
1
by: liam_herron | last post by:
I have compiled my boost-enabled C++ module and have it working when I explicity set my LD_LIBRARY_PATH before invoking the python2.4 interpreter. Now I don't want everyone to have to set this...
11
by: Sean M. DonCarlos | last post by:
I have an unmanaged Win32 app that looks up the name of a DLL (unknown at compile time) from an external location, loads it with LoadLibrary, and then uses GetProcAddress on three exported...
1
by: srikar | last post by:
what is the difference between static linking & dynamic linking, what are the advantages of each? How to perform static linking & Dynamic linking by using gcc -o liniking will be done , but...
7
by: Ajinkya | last post by:
I have writen a program for a game called game.exe Now it includes a player part to which has to be a function to be writen by someone else. Now I want to provide this exe to some tester who...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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.