Solved

Linking Dlls to an exe

Posted on 1998-09-02
1
263 Views
Last Modified: 2013-11-20
In this project that I am involved in there is a number of Dlls going to be linked to the main exe.
1/ I have just being told that load time of the application is not important (not too sure why). So does it matter if all the dlls are linked to the exe by implicit linking. Seen as the time taken to map and load all the dlls at load time is not important. What I am wondering is that if all the dlls are linked by implicit linking, does this effect the efficiency of the whole application at run time, and if so a quick  explanation please.
2/ The login in Dialog/ User administrator list of the application are in one Dll. Should this be linked via implicit linking (even if explicit is used for the other Dlls). This may be quite a stupid question.
3/ When using the

lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL,
                                           "DLLFunc1");
in the exe to explicitly link, how do you pass the function ID as the ordinal value in the def file of the dll.
lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL, 2);
doesn`t work!
0
Comment
Question by:martythegreat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
polimetla earned 50 total points
ID: 1321645
Ans for Q1: An application that implicitly links to many DLLs can be slow to start because Windows loads all the DLLs when the application loads. To improve startup performance, an application can implicitly link to those DLLs needed immediately after loading and wait to explicitly link to the other DLLs when they are needed.

Ans for Q2: you can't. because to link implicitly we need .lib and .h file also. If you got those files you can link implicitly.

Ans for Q3: Here we are passing Function name only. No need to pass Ordinal value.

Note: For more info. Please see VC++ help.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question