|
The IMPORT section is no longer valid in a .DEF file. So there is no way you could tell your C program how to import. Other compilers - including managed code in Visual C++ - do have the option to specify import attributes such as the ordinal for the import.
The article explains two alternatives: one with import by ordinals only for C functions and the other for general functions (but does not use import by ordinal). However, just combine the two solutions and you can get what you want. That is, create stubs for the functions you want to import and also create a DEF file with EXPORTS to specify the ordinal, then generate the dummy DLL and you get a LIB that allows you to import the desired function by ordinal. I did it and it worked.
|