flat assembler
Message board for the users of flat assembler.

Index > Windows > Export procedures from dll without macros

Author
Thread Post new topic Reply to topic
dieboy



Joined: 30 Dec 2004
Posts: 41
Location: Poland, Elblag
dieboy
Can anybody write pure export code? Thanks for answer Smile.

_________________
...
Post 17 Aug 2005, 17:51
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7718
Location: Kraków, Poland
Tomasz Grysztar
Post 17 Aug 2005, 17:57
View user's profile Send private message Visit poster's website Reply with quote
dieboy



Joined: 30 Dec 2004
Posts: 41
Location: Poland, Elblag
dieboy
Eh.. I was searching and I couldn't find this Smile. Thanks.
Post 18 Aug 2005, 08:21
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
RedGhost



Joined: 18 May 2005
Posts: 443
Location: BC, Canada
RedGhost
hey, i suggest downloading some of the old fasm versions with the link provided in said thread it is http://fasm.sourceforge.net/archive/

from like 1.04+ (i think?) it has alot of hardcoded windows examples, including export, procedures, even some resource stuff, i know it helped me alot!
Post 18 Aug 2005, 22:42
View user's profile Send private message AIM Address MSN Messenger Reply with quote
dieboy



Joined: 30 Dec 2004
Posts: 41
Location: Poland, Elblag
dieboy
All right, every thing ok, but I can't "export two procedures" from example dll. I have this code in export section (and the application cannot find the ShowLastError):
Code:
  dd 0,0,0,rva dlldemo_name,1
  dd 1,1,rva addresses_table,rva names_table,rva hints_table

  addresses_table:
    dd rva ShowErrorMessage
    dd rva ShowLastError
  names_table:
    dd rva _ShowErrorMessage
    dd rva _ShowLastError
  hints_table:
    dw 0

  dlldemo_name db 'ERRORMSG.DLL',0

  _ShowErrorMessage db 'ShowErrorMessage', 0
  _ShowLastError db 'ShowLastError', 0    
Post 18 Aug 2005, 23:20
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7718
Location: Kraków, Poland
Tomasz Grysztar
The table called "hints" is in fact the table of ordinal numbers - indexes into the addresses table. Each item in table of ordinals corresponds to the item of the same index in the table of names.
Thus your export should look like:
Code:
  dd 0,0,0,rva dlldemo_name,1 
  dd 1,1,rva addresses_table,rva names_table,rva ordinals_table 

  addresses_table: 
    dd rva ShowErrorMessage ; index 0
    dd rva ShowLastError ; index 1
  names_table: 
    dd rva _ShowErrorMessage 
    dd rva _ShowLastError 
  ordinals_table: 
    dw 0 
    dw 1

  dlldemo_name db 'ERRORMSG.DLL',0 

  _ShowErrorMessage db 'ShowErrorMessage', 0 
  _ShowLastError db 'ShowLastError', 0    

(and remember that table of names has to sorted alphabetically)
Post 19 Aug 2005, 09:42
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.