flat assembler
Message board for the users of flat assembler.

Index > Windows > DLL2INC - generates includes from dlls

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf 21 Jul 2005, 18:48
FASM specific generator for includes ...please read readme.txt in the zip

Tell me what you think

Ralph


New updates:

Version History
-----------------
1.0.0 - Initial Release
1.1.0 - Added progress bar, status bar
- Cleaned up code
- Exports files more than 64k
- Remove dependency to SSubTmr6.dll
- You can type in file names straight into the text box
- Add sample - kernel32.inc which is imported by ordinal

Next version:
1.2.0 - Generates parameter count of dlls (release date uncertain)
- Rewritten in FASM

Other the program is GUI...it accepts command line...

Commandline: DLL2INC [-switch] [dllfile] [outputfile]

Switches:
-o ExportByOrdinal
-n ExportByFunction (default)


Downloads are separated (Binary and Source)


Description: VB6 Source
Readme.txt

Download
Filename: DLL2INCSrc.zip
Filesize: 264.8 KB
Downloaded: 474 Time(s)

Description: Binary - 74.5k exe
Samples - Kernel32.inc
Readme.txt

Download
Filename: DLL2INCBin.zip
Filesize: 77.03 KB
Downloaded: 561 Time(s)


_________________
Raedwulf


Last edited by Raedwulf on 22 Jul 2005, 18:36; edited 2 times in total
Post 21 Jul 2005, 18:48
View user's profile Send private message MSN Messenger Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf 21 Jul 2005, 18:51
It may be buggy because I've not time to test it thoroughly Razz
OK was very buggy indeed Very Happy two bugs were fixed (one very serious because I accidently left a unused ocx referenced which caused the app to crash )
Post 21 Jul 2005, 18:51
View user's profile Send private message MSN Messenger Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend 21 Jul 2005, 22:15
Hey. I wrote such a thing in FASM sometime ago. Check this: http://board.flatassembler.net/topic.php?t=3229
Post 21 Jul 2005, 22:15
View user's profile Send private message Visit poster's website Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf 22 Jul 2005, 01:30
hehe back in march, i hadn't learnt any assembly at all yet Very Happy

Hmmm good prog...but I made some nice GUI this time hehe Smile

_________________
Raedwulf
Post 22 Jul 2005, 01:30
View user's profile Send private message MSN Messenger Reply with quote
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav 22 Jul 2005, 06:26
Reverend, may i request a feature for you program? Smile it's a unicode support, for now only ascii functions are gathered
Post 22 Jul 2005, 06:26
View user's profile Send private message Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf 22 Jul 2005, 10:46
My DLL2INC supports unicode and imports with ordinal too Very Happy
It also supports command line - read 'readme.txt' for info on the parameters.
Post 22 Jul 2005, 10:46
View user's profile Send private message MSN Messenger Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard 22 Jul 2005, 12:34
For such purpose I was usually using similar program from Comrade's homepage (http://comrade64.cjb.net). I think Vortex has written similar program too... so there's quite a lot of dll2inc apps Smile
Post 22 Jul 2005, 12:34
View user's profile Send private message Visit poster's website Reply with quote
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav 22 Jul 2005, 13:40
Raedwulf, your program very huge, written in vb and use 3-d party libraries, this program not for me, sorry
Post 22 Jul 2005, 13:40
View user's profile Send private message Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf 22 Jul 2005, 13:51
hehe ok...I'll rewrite it in fasm Smile ....actually wrote it in vb first because iwanted something to work but hehe ill write in fasm to learn hehe.

_________________
Raedwulf
Post 22 Jul 2005, 13:51
View user's profile Send private message MSN Messenger Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 22 Jul 2005, 14:58
Code:
-- -------------------------
DLL2INC.exe - Application Error
---------------------------
The instruction at "0x66063fea" referenced memory at "0x00000014". The memory could not be "read".


Click on OK to terminate the program
Click on CANCEL to debug the program
---------------------------
OK   Cancel   
---------------------------
    


I couldn't run a debugger to give more information... something is screwed up on this system.

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 22 Jul 2005, 14:58
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 22 Jul 2005, 15:00
Vasilev Vjacheslav, you can try my version of dll2inc tool with /U switch which will only output functions that end with "W" or do not end with "A" (e.g. CreateFileW -> CreateFile, GetCurrentProcess -> GetCurrentProcess).

http://comrade.ownz.com/sources/dll2inc.zip
Post 22 Jul 2005, 15:00
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf 22 Jul 2005, 15:08
comrade, I think you may have forgotten to press setup.bat

(This is for the last version) If you download the new version you don't have any setup.bat.


Last edited by Raedwulf on 22 Jul 2005, 18:39; edited 1 time in total
Post 22 Jul 2005, 15:08
View user's profile Send private message MSN Messenger Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf 22 Jul 2005, 18:38
Ok updated it again:) Razz
This time it doesn't use any third party libraries and runs straight as an exe file.
Of course I can't stop vb6 bloating a exe but im sure 74.5k exe is not too bad.
I will rewrite it in FASM when I learn enough and finish with another project I'm doing.
Post 22 Jul 2005, 18:38
View user's profile Send private message MSN Messenger Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 22 Jul 2005, 19:18
Yes, indeed, I did forget to press the setup.bat button.

This tool is very nice, and is very similar to something I have already seen. Smile
Post 22 Jul 2005, 19:18
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf 22 Jul 2005, 21:01
Hope you dowlnloaded the newer one ...it looks nicer and has some bug fixes Smile and doesn't have ssubtmr6.dll as a dependency. Could you tell me where the one you saw was...i've haven't found it hehe Razz

I'm planning to add the feature to search at the function address and find the ret statement (the hex) and take the immediate value so i can find the parameter count. What do you think?
Post 22 Jul 2005, 21:01
View user's profile Send private message MSN Messenger Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend 22 Jul 2005, 22:10
Vasilev Vjacheslav wrote:
Reverend, may i request a feature for you program? Smile it's a unicode support, for now only ascii functions are gathered
Do you mean something as comrade mentioned? Ie. to output names with -W (CreateFileW) instead of -A (CreateFileA)? If so, do yuo think it'd be better to output two forms eg.:
Code:
(...)
CreateFile, 'CreateFileA',\
CreateFileW, 'CreateFileW'.\
(...)    
Or is it better to output only one form, depending on given command line parameter?
Post 22 Jul 2005, 22:10
View user's profile Send private message Visit poster's website Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf 23 Jul 2005, 04:46
That's what's comrade's command line tool does...maybe you could do -a for ansi, -w for unicode and -a -w for both Smile

I'll be adding that to mine shortly.

_________________
Raedwulf
Post 23 Jul 2005, 04:46
View user's profile Send private message MSN Messenger Reply with quote
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav 23 Jul 2005, 07:28
comrade, ok, thanks
Reverend, yes, something as comrade mentioned, but your idea is also good
Post 23 Jul 2005, 07:28
View user's profile Send private message Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend 26 Jul 2005, 20:48
Vasilev Vjacheslav: http://board.flatassembler.net/topic.php?t=3229 Uploaded there new version with enhancements as you requested. Now '-a' will output only ANSI, '-w' will output only Unicode, '-aw' or '-wa' will output both. Also when choosing mode with ANSI or Unicode only (not both) the name is generated without suffix, ie.:
Code:
        apiresolve -a kernel32.dll
        invoke  SetWindowText, [hwnd], text 
        ; fasm will output in import table 'SetWindowTextA'

        apiresolve -w kernel32.dll
        invoke  SetWindowText, [hwnd], text 
        ; fasm will output in import table 'SetWindowTextW'

        apiresolve -aw kernel32.dll
        invoke  SetWindowText, [hwnd], text 
        ; fasm will generate an error 'Unknown name' (or something like
        ; that Smile), because you'll have to use then in code
        ; 'SetWindowTextA' or 'SetWindowTextW' yourself    

The only fact that isn't good all about it, that the program doesn't output 100% correctly. For example in kernel32.dll there are such APIs:

  • lstrlenA
  • lstrlenW
  • lstrlen
When using only ANSI or only Unicode mode, my program will output like this: (assumig that '-a' was used)
Code:
        (...)
        lstrlen,'lstrlenA',\
        lstrlen,'lstrlen',\
        (...)    
And I have no idea how to fix this problem, because to avoid such situtation I would have to build large database with hashes or whatever and compare every new import with ones seen before. I guess this matter will rest in programmer's hands.
Also when building include file from 'ntdll.dll' there's names reserved in FASM eg. 'fcos'. These are also to fix manually by every programmer. Sorry, but there would be hell a lot of work with avoiding these two situatons, but they can be easily fixed even by beginner so I don't see a point why I should check it in program

Next thing, I may also add some switch to output imports as ordinals, but anybody will ever use it? Maybe only in 4K intros with ogl, but I assume that 4k coders won't have regular import table at all Smile So for now, I won''t code it

EDIT: btw. dlls are windows specific, so why is this thread in main?
Post 26 Jul 2005, 20:48
View user's profile Send private message Visit poster's website Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf 27 Jul 2005, 06:51
Quote:
EDIT: btw. dlls are windows specific, so why is this thread in main?


Oops Smile

_________________
Raedwulf
Post 27 Jul 2005, 06:51
View user's profile Send private message MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.