flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > EXPORT macro PROBLEM

Author
Thread Post new topic Reply to topic
meming



Joined: 15 Jun 2011
Posts: 2
meming
Hello, I've made my own export macro, but it has some problems. Whenever I import functions from my DLL in another program, I get 'the procedure entry point 'myfunc' could not be found in 'mydll' '. About the first 4 functions that i pass into export get exported successfully, but none of the others do. It seems order matters in my export function.

Code:
macro export dllName, [ procs ]
{
        count = 0
        forward count = count + 1

        common  dd      0,0,0,RVA _#dllName,0,count,count,RVA __#dllName,RVA ___#dllName,RVA ____#dllName

        _#dllName       db      `dllName#'.DLL',0

        __#dllName:
                forward dd      RVA procs

        common
                ___#dllName:
                        forward dd      RVA _#procs

        forward _#procs         db      `procs,0

        common  count = 0

        ____#dllName:
                forward dw      count
                count = count + 1
} 

;used like this ( you don't give it text strings, the macro converts the arguments into them )

export mydll,\
          myfunc1,\
          myfunc2
    
Post 26 Jun 2011, 03:20
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
1. Export names must be sorted
2. Use Japheth's "PE" (what a unique tool name Laughing )
3. Moving Main-> Macroinstructions
Post 02 Jul 2011, 04:19
View user's profile Send private message 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 YouTube, Twitter.

Website powered by rwasa.