Skip to content

Instantly share code, notes, and snippets.

@CoderPuppy
Created October 4, 2016 02:54
Show Gist options
  • Save CoderPuppy/b3c3949dd1f44aeebd175854ff1858b6 to your computer and use it in GitHub Desktop.
Save CoderPuppy/b3c3949dd1f44aeebd175854ff1858b6 to your computer and use it in GitHub Desktop.
A tool for generating .defs (and then .libs) from .dlls

This is a tool for generating .defs (and then .libs) from .dlls I created while helping @hbomb79

Usage

batch:

dumpbin -exports <lib>.dll > <lib>.dll.exports

shell:

{echo LIBRARY <lib>.dll; echo EXPORTS; lua manip.lua <lib>.dll.exports.txt} > <lib>.def

batch:

lib /def:<lib>.def
for line in io.lines((...)) do
local name = line:match '^%s+%d+%s+[%dA-F]+%s+[%dA-F]+%s+(.+)$'
if name then
print(name)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment