Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 10-02-2006, 19:14
MarkusO
 
Posts: n/a
The way Microsoft describes the problem is quite complex and I don't see how to use the document to import by ordinals (since "IsOS" is not exported by name, only by ordinal). I only know a far more simple way.

Create a *.DEF file with the following content:
Code:
IMPORTS
  IsOS = SHLWAPI.437
Declare the "IsOS" function as external. Then pass the *.DEF file to your linker and use the "import by ordinal" option (every linker has it, not only the Borland linker). The problem is that the Microsoft linker says that "IMPORTS" is not supported on Win32, which makes it quite useless here (but it works with Win16 ordinals).

This will then import all functions by name, expect the one you called "IsOS", which is imported by ordinal. If you don't use the "import by ordinal" switch, your program will try to load "IsOS" from SHLWAPI.DLL and (of course) fail.

If you have to use the Microsoft linker for some reason, you should simply create yourself a program which parses your import table and replaces a given imported name with it's ordinal. Of course this will require manual input if the function isn't exported by name at all.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DNGuard Static Unpacker CodeCracker Community Tools 6 02-25-2026 16:45
CrackMes.de Static Mirror SmilingWolf General Discussion 4 01-16-2019 19:07
Import Rebuilding Without Import Table Kerlingen General Discussion 11 01-13-2005 10:24


All times are GMT +8. The time now is 17:42.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )