What method is BEST?

include xxx.inc
includelib xxx.lib

or use

LoadLibrary & GetProcAddress


First method will cause an error (something like CANT FIND FUNCTION...)in old systems (like Windows NT 4.0 SP4 or less or Windows 95) ... with second you can show a msgbox if LoadLibrary fails ...

Posted on 2002-01-30 10:36:27 by elmenda
For stuff like the win2000+ window transparency stuff, use loadlib/gpa,
as the program will/should retain full functionality even with opaque

If you need stuff like VirtualAllocEx, and you need it for your
app to work, use implicit linking, and put a "requires NT" in your
program documentation.
Posted on 2002-01-30 11:05:04 by f0dder
I prefer the LoadLib method, (even for regular stuff). It is "slower" a little and harder to code though. That's because I still program for win95 stations and there are a lot of the new api that don't work on a brand new 95 installation.

My opinion is that if the compatibility to previous systems aren't required and distributing dlls aren't a problem either, the include method is better, faster and easier.
Posted on 2002-01-30 12:19:08 by Silas
I think implicint link is better cause a lot of "new" functions are included in SPs in NT 4.0 and in Windows98+ ... btw Windows NT 4.0 & Windows 95 will die (not more support) in June 2003.

I will save lot of .DATA and .CODE with implicint link.
Posted on 2002-01-30 12:49:15 by elmenda