flat assembler
Message board for the users of flat assembler.

Index > Windows > Creating *.h from *.DLL files

Author
Thread Post new topic Reply to topic
Chewy509



Joined: 19 Jun 2003
Posts: 297
Location: Bris-vegas, Australia
Chewy509
Hi Guys,

This isn't really an assembly question, but is sort of related.

If I create a *.dll file using fasm, it's nice and easy to link to it using assembler. (Just define the name in the Import section).

However, if I want to link to the *.dll (which was originally written in fasm) using say VC++, VB.NET or Delphi, etc we need an appropriate header files for those HLL's and Compilers.

Does anyone know of a tool or tools that can create the template for a *.h file (for use with C/C++), and optionally the *.lib file (for linking), or the appropriate header files for other languages based on the export section within a compiled *.dll file WITHOUT the original source or *.OBJ file?

MSDN comes up with a few hints, but nothing concrete.

PS. I know that any tool won't know about the types and number of parameters passed, but as long as it and get the function name list, that'll be good enough, as I could just manually type in the parameters to be passed.
Post 13 Jul 2007, 02:53
View user's profile Send private message Visit poster's website Reply with quote
Yardman



Joined: 12 Apr 2005
Posts: 245
Location: US
Yardman
[ Post removed by author. ]


Last edited by Yardman on 17 Jan 2012, 03:43; edited 1 time in total
Post 13 Jul 2007, 07:56
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Chewy: It's not possible to create .h file just from .dll. It would be problem even to do it from .asm sources. Problem is that in C, you need to know arguments of functions, and also their types.
Code:
int func1(char* x, int y);
int func2(char** x, int y);
int __stdcall func3();    


So i would suggest to create that .h file yourself, i think you don't have that many exported functions in FASM dll to really need some tool.
Post 13 Jul 2007, 09:45
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex
def2lib can create import libraries from module definition files :

http://vortex.masmcode.com/files/def2lib10.zip

http://board.flatassembler.net/topic.php?t=6422

_________________
Code it... That's all...
Post 13 Jul 2007, 17:49
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.

Powered by rwasa.