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

Jeffrey Altman jaltman at secure-endpoints.com
Wed Oct 3 17:14:19 EDT 2007


Danilo Almeida wrote:
>> 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.
>
> I see.
>
> IIRC, if you don't provide ordinals in the .def, the default link using the import lib is w/o ordinals.  But if you provide ordinals, the import lib will link by ordinals.  Is that still the case?  Or is there some way to control that?
As far as I can tell by a quick review of MSDN, exporting with ordinals
and without the NONAME flag provides the best of both worlds.  It
permits loading by name and optimizes the load time of the DLL by
avoiding the need for the loader to search for the function by name to
obtain the ordinal.  Recent Windows loaders will compare the name of the
function found at the specified ordinal to check for a match and can
perform a subsequent search by name if necessary.

Exporting by ordinals is only a problem if the NONAME flag is specified
on the export as there is no name information available for the loader
to perform a load time check.

Jeffrey Altman

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3355 bytes
Desc: S/MIME Cryptographic Signature
Url : http://mailman.mit.edu/pipermail/kfwdev/attachments/20071003/0d296195/attachment.bin


More information about the kfwdev mailing list