Posted on 2001-06-20
Last Modified: 2013-11-20
hi All,
i have a DLL and the H files, but i do not have the Lib, how can i link this Dll into my VC++ project.
the dll project never created a library...
is it posible ?

Question by:Shay050799
LVL 12

Accepted Solution

migel earned 50 total points
ID: 6211778
you have to create def file and then use lib /def command for create import library .
for reference see MSDN article:
HOWTO: Create 32-bit Import Libraries Without .OBJs or Source

Expert Comment

ID: 6211991

Also a possibility is linking the dll at runtime:

in your class where you want to use the dll declare member variables for the functions, e.g.

BYTE (__stdcall* m_lpMyFunction)(int);

.... and a handle for the dll:

HINSTANCE m_hDllInstance;

in your cpp file implement the following (best in the class constructor):

    m_lpMyFunction=(BYTE (__stdcall*)(int msg))GetProcAddress(m_hDllInstance,"FunctionNameInDll");
    AfxMessageBox("Can't load DLL!");

Just look for your .h file of the dll for the correct function definitions

Expert Comment

ID: 6212754
I perfer to use the LoadLibrary() fnunction calls;
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.


Expert Comment

ID: 6501706
In the 'Link' tab of the 'Project Settings' dialog for the calling program, in the 'Object/library modules edit control you must add the full path for the .LIB file.  You said you did not get a .LIB soooo.... if you will send me your EMAIL address (I'm and I will send you two projects; one for a working 'Caller' and one for a DLL that it will call.

christophm (

Expert Comment

ID: 6799514
Shay----->  You have asked 95 questions at this site, and only awarded 53 of them....  this is totally against the Guidelines of this site.  Please return to them and update/finalize them this week.  The list is below.  Of these 53 awarded, there are 7 questions that are -1 user id problems which we will need to manually correct.  Please accept the first correct response in each of them and award the experts who helped you with the deserved "A" grade, or comments if less than an A as to why.  If you need our help to special handle any of these, let us know that as well via comment here.  If these are not finalized this week, I will contact Administration for further action.  Please click the HELP DESK link on the left for the rules of engagement here (Guidelines, Member Agreement and Question/Answer process).

I also noticed that a number of your questions are less than 50 points, which is the recommended value for EASY questions, with 300 points the maximum.  To draw additional attention, you can always increase their values without our assistance. November, 2000, zero comments added, 5 points. November, 2000 ZERO points, comments added October, 2000 - 15 points  November, 2000      "      "  July, 2001 - 5 points    "      - 10 points  May, 2001 5 points  May, 2001 0 points

I have asked Administration to Email you in these regards.  I also noticed several other things I'd like to bring to you attention.  There are some that you did award with "C" grades, and no comment as to why.  Also, some of your questions have had zero response, and that is likely for two reasons:  Poor closure on open items and poor grades.  I think you'll agree, epecially given the number of questions you've asked here, that experts here take great pride in their work, and deserve "A" grades and responses to all help they've given you.

EXPERTS -->  In the event any of these items remain open at the end of this week, I will finalize them and look to you for guidance on the fair results.  As always, we very much appreciate your willingness to help and the excellent support you all give.


Community Support Moderator @ Experts Exchange

Expert Comment

ID: 6822849
Admin notified of user neglect. Force/accepted by

Community Support Moderator
Experts Exchange

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Show shut-down message as Windows 8 shuts down. 9 90
Question regarding Copy/Paste 16 96
ShiftLeft challenge 21 80
canBalance challenge 34 82
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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…
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 video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

770 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