469,954 Members | 1,755 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,954 developers. It's quick & easy.

VC++ 2003 Does Not Support DEF files -- Correct?

I just wanted to confirm this for WIN32 projects in VC++ 2003.

It looks like you need to reference functions in 3rd party DLL's (C-based)
by building a LIB file as described here:

http://support.microsoft.com/default...;EN-US;q131313

Am I wrong in my assumption?

TIA

Harry
Nov 17 '05 #1
2 1081
"Harry Whitehouse" <ha***@envmgr.com> wrote in message
news:uR**************@tk2msftngp13.phx.gbl...
I just wanted to confirm this for WIN32 projects in VC++ 2003.

It looks like you need to reference functions in 3rd party DLL's (C-based)
by building a LIB file as described here:

http://support.microsoft.com/default...;EN-US;q131313

Am I wrong in my assumption?


Well, that's not strictly true.

Certainly, when developing unmanaged components that is the easiest way to
go. But, there is nothing to stop you from calling the target functions
through a pointer by means of an explicit load of the 3rd party DLL with
LoadLibrary(), and finding the entry points of the functions with
GetProcAddress(), and calling the functions through the returned pointer,
and finally finishing some time later with FreeLibrary(). This can get
tedious in a hurry.

If you are developing managed components, you can use the services provide
by Platform Invoke. I'd explain, but I don't think that's what you are up
to. If so, just holler.

Regards,
Will

Nov 17 '05 #2

Harry Whitehouse wrote:
I just wanted to confirm this for WIN32 projects in VC++ 2003.

It looks like you need to reference functions in 3rd party DLL's (C-based) by building a LIB file as described here:

http://support.microsoft.com/default...;EN-US;q131313

VC++ 2003 does support def files as well as previous versions, , but
def files are usually used when building a DLL.
What is described in this KB is a "hack" to get a LIB file when you
have only a DLL. This hack will work in VC2003 as well as in previous
versiosn.
The usual way to use a DLL is :
- if you've got .h and .lib, use them.
- Elsewhere, use LoadLibrary/GetProcAddress.

Please describe the context of your problem for a more meaningfull
answer.

Arnaud
MVP - VC

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by ultranet | last post: by
7 posts views Thread by ultranet | last post: by
5 posts views Thread by JesseJr | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.