PeExpLib2Inc1 import library functions to inc-file for poasm

Started by TimoVJL, December 06, 2013, 11:31:24 AM

Previous topic - Next topic

TimoVJL

Small C program PeExpLib2Inc1.exe write function PROTO's from import library to inc-file.
PeExpLib2Inc1.zip
May the source be with you

jj2007

Hi Timo,

I made a test with some lib files as input but so far no output. How exactly do you use it?

TimoVJL

May the source be with you

jj2007

Works:
PeExpLib2Inc1.exe \Masm32\lib\Kernel32.lib >Kernel32.inc

Fails:
PeExpLib2Inc1.exe \Masm32\lib\masm32.lib >masm32.inc

Why that?

TimoVJL

May the source be with you


TimoVJL

PeLib2Inc.zip with FindFirstFile/FindNextFile mask.
Any better now ?
EDIT fix for silly error.
May the source be with you

jj2007

Hmmm....

PeLib2Inc.exe \masm32\lib\user32.lib works fine
PeLib2Inc.exe \masm32\lib\kernel32.lib has "file open error" (and worked fine with version 1)

Edit: Works like a charm now :)
Quote from: timovjl on December 06, 2013, 08:34:37 PM
PeLib2Inc.zip with FindFirstFile/FindNextFile mask.
Any better now ?
EDIT fix for silly error.

Vortex

Code it... That's all...

TimoVJL

I recommend that too  ;D
May the source be with you

jj2007

Quote from: Vortex on December 07, 2013, 05:37:36 PM
lib2inc can create an include file from a static library

Hi Erol & Timo,

I have a n00bish question. I use inc files on a daily basis, and I always appreciated that there are gentlemen like Pelle or Hutch who write them. The question is really: how do they do that?
I know there are tools that convert a DLL into a static lib, and you can grab the number of dword paras from the name tables etc - but what about REAL4 or REAL8 or RECT PTR args? Do you parse a set of C header files to get these subtleties, do you grab it from MSDN online docu, ...? The DLLs certainly don't contain the definition of RECT or WNDCLASSEX, so some manual parsing must take place, but what are the best sources?

Vortex

Hi Jochen,

Converting the equates and structure definitions from the SDK C\C++ header files is a difficult task. As you mentioned, some manual tweakings are unavoidable. Japheth,ToutEnMasm and Donkey created their own include file set. Creating include files for API function declarations is easier. You need to read the MS COFF import library specification to understand the structure of import libraries. Converting a statement like _MessageBoxA@16 to a sequence of PROTO and DWORD is easy. To be honest, my converter assumes everything as DWORDs.
Code it... That's all...

Vortex

Quote from: timovjl on December 07, 2013, 06:08:31 PM
I recommend that too  ;D
If only Avast allows downloading that file.

Hi Timo,

Are you referring to my lib2inc tool?
Code it... That's all...

Vortex

Timo,

As an assembly programmer, you should probably know that it's false-positive :

http://virusscan.jotti.org/en/scanresult/17924fd8de471ba282983f41deb6d84ca08e3b36/7768e871004cc7c04dbdb3acffe6ba75b14fc3be

https://www.virustotal.com/tr/file/0f4828389b2e1da84f025828b01834276072a6eba68fc0adccddb56f9275b0e6/analysis/1386439581/

Avast reports the exe as safe so you should be more careful while commenting another coder's work. Think twice before posting here. I hope you got it clearly.
Code it... That's all...

TimoVJL

I just inform Avast's heuristics problem, that prevent downloading some file.
BTW: I'm not an assembly programmer.
May the source be with you