Extract lib from dll on Windows

1. exports

extract the functions and classes in *.dll by:
$> dumpbin.exe /exports libsample.dll /out:libsample.def

2. function names

edit libsample.def and remove everything except function names (keep C++ name mangling chars). then add EXPORTS as the first line. as:

EXPORTS
?sha1@Hash@polarssl@@SA?AVQByteArray@@ABV3@@Z
?sha1@Hash@polarssl@@SA?AVQByteArray@@ABVQString@@@Z
?sha1@Hash@polarssl@@SA_NABVQString@@0@Z
?sha4@Hash@polarssl@@SA?AVQByteArray@@ABV3@W4TSHA4@12@@Z
?sha4@Hash@polarssl@@SA_NABVQString@@0W4TSHA4@12@@Z
dt_jalali_add_seconds
dt_jalali_diff
dt_jalali_from_daynum
dt_jalali_to_daynum
dt_jalali_to_gregorian
dt_jalali_year

3. make *.lib

run this line depending on architecture:
$> lib.exe /def:libsample.def /machine:arm /out:libsample.lib

source