🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #8184

Re: Is it possible to use Wininet functions WITHOUT LINKING the Wininet.lib ??

#8184
From: Bob Gonder
Date: Sat, 13 Nov 2004 21:21
30 lines
2555 bytes
Remy Lebeau (TeamB) wrote:

>On the other hand, if you do statically link to the lib file, then not only
>does the DLL itself have to exist, but so does every individual function
>that your code calls.  If you run your program on a system that does not
>have every single WinInet function that your code calls statically, then
>your program will fail to start at all.

I don't think that last part is correct.
I don't think the startup even knows which functions you use.
It just fills in the table with what it finds in the dll.
If a table entry isn't filled in (new function, didn't exists in old
dll) then if the application calls it, it gets a return error of
function not supported.

For example: CopyFileEx on '98 system has GetLastError of 120.
Same for MoveFileEx
Took me a while to figure out that "This function is only valid in
Win32 mode" means it's a new funtion  :->


>Then LoadLibrary() and GetProcAddress() are your only option.  Of course,
>had you been using BCB 5 or 6, you could make use of their Delay-Load
>mechanism to statically link to the DLL functions in your code while still
>providing run-time loading of the DLL when needed.  A very nice feature to
>use if you have it available.

It's an ilink32 option.
(Not saying it's not new in b5, just if one were to look for it,
that's where you'd find it)
Technical Details
Message-ID: <rftcp05c1rv7h9tahtrs9i6u38kt3au33b@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsoutpeer00.lnd.ops.eu.uu.net!lnewsinpeer01.lnd.ops.eu.uu.net!emea.uu.net!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <419508ed$1@newsgroups.borland.com> <419516cd$1@newsgroups.borland.com> <41955b2e$1@newsgroups.borland.com> <41955ff6@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,7fd10020e90983c
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Is it possible to use Wininet functions WITHOUT LINKING the Wininet.lib ??
Date: Sat, 13 Nov 2004 13:21:59 -0800
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <rftcp05c1rv7h9tahtrs9i6u38kt3au33b@4ax.com>
References: <419508ed$1@newsgroups.borland.com> <419516cd$1@newsgroups.borland.com> <41955b2e$1@newsgroups.borland.com> <41955ff6@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.77.36.38
X-Trace: newsgroups.borland.com 1100380914 67.77.36.38 (13 Nov 2004 13:21:54 -0700)
Lines: 32
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsoutpeer00.lnd.ops.eu.uu.net!lnewsinpeer01.lnd.ops.eu.uu.net!emea.uu.net!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail