Jump to content

Generating DEF file for API wrapper


Dibya

Recommended Posts

Anyone know any script/ batch file /program that can convert list of API into forwarded API def file for link.exe?

For example if I feed kernel32.dll it will create a def file for kernel32 wrapper like this 

Firstfunction = Kernel32.Firstfunction#1

We can do it easily for C++ but I need for MASM

 

Edited by Dibya
Link to comment
Share on other sites


DykZtKx.png

 

You need first to add the path of MinGW's bin directory to your PATH env variable.
 

D2ob28r.png


Then it's trivial :

gcc -o tiny_impdef.exe tiny_impdef.c

Then to generate a def file :

tiny_impdef.exe regex2.dll

Then you get the generated file :

l3Oyq2L.png

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...