Proposal for the assignment of fixed ordinals to exported functionsin kfw dlls

Danny Mayer mayer at ntp.isc.org
Sun Oct 7 23:03:39 EDT 2007


Jeffrey Altman wrote:
> Danilo Almeida wrote:
>>> To ensure that each exported function is given the same value from
>>> release to release so that any applications that link to functions by
>>> ordinal instead of by name will not obtain an incorrect function address.
>> But why would anyone want to link by ordinals (and why would one want to encourage that)?
> 
> Its not a question of encouragement.  Its a question of making sure that
> there aren't crash reports in applications that are blamed on KFW. 
> Consider it "CYA" if you must. 

That's probably not the best way of wording it. The real benefit is
backward compatibility. When you add functions to the library you
guarantee that the new DLL can continue to be used by any applications
linked to the old DLL by making sure that the old functions continue to
use the same ordinal and you give new functions new ordinal values. It's
not exactly link by ordinals, since it's the name of the function that's
used. The Def file contains both the name of the function AND the ordinal.

Danny



More information about the kfwdev mailing list