flat assembler
Message board for the users of flat assembler.

Index > Windows > DLL to include file converter for MS COFF output

Author
Thread Post new topic Reply to topic
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex
The tool dlltoinc produces lists of DLL function declarations to support Fasm MS COFF output
Code:
dlltoinc dllname.dll [-w]

optional -w : UNICODE
    


An example result is an include file containing the following listing for kernel32.dll
Code:
dlltoinc kernel32.dll

kernel32.inc :

extrndef  ActivateActCtx
extrndefA AddAtom
extrndefA AddConsoleAlias
extrndefA AddLocalAlternateComputerName
extrndef  AddRefActCtx
.
.
.
    


extrndef and extrndefA are two macros declaring external functions:
Code:
macro extrndef func
{
  if used func
    extrn func : dword
  end if
}

macro extrndefA func
{
  if used func
    extrn `func#'A' as func : dword
  end if
}
    


The include files produced by the tool are used to link Fasm MS COFF object files with Golink. You can check the attachment for an example.


Description: DLL to include file converter for MS COFF output V1.0
Download
Filename: dlltoinc.zip
Filesize: 16.65 KB
Downloaded: 136 Time(s)


_________________
Code it... That's all...
Post 23 May 2004, 19:39
View user's profile Send private message Visit poster's website Reply with quote
ShortCoder



Joined: 07 May 2004
Posts: 105
ShortCoder
Thanks:) I can see where this can be useful.

Aren't you going to have to use something also to generate library files for inclusion (object files with necessary information about positions of each function in the dll files)---or does GoLink do that for you?

_________________
Boycott Symantec/Norton/PowerQuest whenever possible
Post 29 May 2004, 14:50
View user's profile Send private message Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex
ShortCoder,

You are welcome. To process object files, GoLink requires only the name of the object file and the name of DLLs exporting the functions used in the source code:
Code:
golink filename.obj kernel32.dll user32.dll gdi32.dll    

_________________
Code it... That's all...
Post 29 May 2004, 21:35
View user's profile Send private message Visit poster's website Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex
Version 1.1
=======

This new version is designed to be used with Pelle's linker Polink

Import libraries extracted from DLLs :
Code:
polib /nound /out:kernel32.lib \windows\system32\kernel32.dll
polib /nound /out:user32.lib \windows\system32\user32.dll
polib /nound /out:gdi32.lib \windows\system32\gdi32.dll
    


These libraries contains names with no decoration.

Simplified extrndef macro :

Code:
macro extrndef func,func2
{
  if used func2
    extrn func as func2 : dword
  end if
}
    


Description:
Download
Filename: dlltoinc11.zip
Filesize: 55.34 KB
Downloaded: 108 Time(s)


_________________
Code it... That's all...
Post 16 Jul 2005, 15:16
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.