flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > dll2inc - export dll functions into fasm inc file.

Author
Thread Post new topic Reply to topic
sleepsleep



Joined: 05 Oct 2006
Posts: 12204
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep 05 Feb 2014, 08:04
i coded this tool to direct output dll functions into fasm inc format,

please hand remove some functions name if they are conflict with asm reserved words.

one must use complete file path when specify the dll file.

if you put this tool in PATH, to run it, you must still type dll2inc.exe

example output
Code:
 +----------------------------------------------------+
 | dll2inc - export dll functions into fasm inc file. |
 +----------------------------------------------------+

   [ usage ]  = D:\dll2inc.exe D:\dlldir\dllfilename.1-2.3.dll

   [ output ] = D:\dlldir\dllfilename.1-2.3.inc

 ------------------------------------------------------
    


successful exported inc file is inside specified dll directory
Code:
D:\fasmw17117>dll2inc.exe d:\PROJECT\sqlite3.dll

[pdllh]  . . . . . . . . . . . . . . . . = 0x60900000
e_magic                                  = 0x5A4D
e_lfanew . . . . . . . . . . . . . . . . = 0x80
e_lfanew addr                            = 0x60900080
signature  . . . . . . . . . . . . . . . = 0x4550
magic                                    = 0x10B
RvaAndSizes  . . . . . . . . . . . . . . = 16
IMAGE_DATA_DIRECTORY[0].VirtualAddress   = 0x60972000
NumberOfNames  . . . . . . . . . . . . . = 206
AddressOfNames                           = 0x7236C

   206 functions exported
    


08/02/2014
a. uploaded new set of gtk dll inc files (should be ok now) into google drive.

b. uploaded binary dll2inc.exe with fixes

07/02/2014
a. fix cinvoke fopen,oufwrite,<'wb+',0>, no b open using fopen will cause another 0x0D appended while fprintf.

b. dll name that contained - (dash) will get changed into _ (underscore), otherwise fasm will detect that dll name as something invalid.

c. source file updated.


Last edited by sleepsleep on 07 Feb 2014, 16:56; edited 4 times in total
Post 05 Feb 2014, 08:04
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 12204
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep 05 Feb 2014, 08:08
code is very unoptimized, but work,


binary available here,
Quote:

dll2inc.exe 5KB
http://goo.gl/ttT4Rz


Quote:

gtk 32bit dll api into fasm inc (not 100% tested) 115 KB
http://goo.gl/KXxawa


Description:
Download
Filename: dll2inc.asm
Filesize: 7.23 KB
Downloaded: 1136 Time(s)



Last edited by sleepsleep on 07 Feb 2014, 07:53; edited 2 times in total
Post 05 Feb 2014, 08:08
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1378
Location: Piraeus, Greece
Picnic 24 Jun 2018, 19:16
Well, i used it today and got my include file. Smile
Post 24 Jun 2018, 19:16
View user's profile Send private message Reply with quote
xiaolaba



Joined: 31 Jan 2015
Posts: 11
xiaolaba 01 Nov 2023, 09:51
hi, this is something perhaps need tweaking after a almost 2 decades.
the code is not running well in Win10 today. both local assembled dll2inc.exe or the original author's one, no longer be able to produce .inc, 0 byte of content.

any hints or help, please share yours.
my test build is filed as open project host on github,
https://github.com/xiaolaba/FASM_soundcard_input/tree/main/dll2inc_virus_alert

thanks.
Post 01 Nov 2023, 09:51
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3892
Location: vpcmipstrm
bitRAKE 01 Nov 2023, 13:22
Another option is macomics's export tool.

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 01 Nov 2023, 13:22
View user's profile Send private message Visit poster's website Reply with quote
xiaolaba



Joined: 31 Jan 2015
Posts: 11
xiaolaba 02 Nov 2023, 11:57
bitRAKE wrote:
Another option is macomics's export tool.


it is lovely, our job is done.
thanks

_________________
best regards,
xiao
Post 02 Nov 2023, 11:57
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.