Solved

Linking Dlls to an exe

Posted on 1998-09-02
1
258 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
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now