flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Nikolay Petrov
Please help me
![]() How i export a functions from exe file? thanks in advance |
|||
![]() |
|
vid
just like in DLL, create export section/data like you would in DLL
|
|||
![]() |
|
vid
hmm, i quess it has something to do with Dll init procedures (called each time app wants to use some DLL) it is pointed by entry point of file, so i quess that you are calling ExitProcess inside it, while as DLL entry proc it should return. But i am not sure, try it.
|
|||
![]() |
|
Vortex
Nickolay,
Why your executable should export functions? Why not to use a DLL? _________________ Code it... That's all... |
|||
![]() |
|
IronFelix
Nikolay, i have done something like this: i exported some function from EXE and imported it in DLL, used by this EXE. I think it is useful when you want to export some pointer to datablock into DLL without extra coding (initialization functions, etc.) - this will be done by OS. But it works only on WinXP, on Win98 it fails. If you still need the example, i shall try to find it in my progs.
Regards. |
|||
![]() |
|
Nikolay Petrov
IronFelix it's will be an interesting.
![]() |
|||
![]() |
|
JohnFound
I am not very sure, but it is possible that Win98 doen't relocate the .exe files even if there is a reloc section... So, maybe it is possible to import functions dynamically using LoadLibrary or possibly LoadLibraryEx with GetProcAddress. Maybe if the .exe is loaded with LoadLibrary the loader will provide relocations???
Another atempt may be GetProcAddress with hInstance of the .exe (if this exe running in the moment)... Regards. |
|||
![]() |
|
Nikolay Petrov
John, i think that it doesn't matter if we import a function with LoadLibrary - GetProcAddress, or as import data, but maybe you right about the way. I collect some executable with working export functions and interesting for me is a loading 'dll' address - 00410000h, but it's entry point my exe...
At this moment i exported a working function from executable without using winapi or other dll functions. If i include it - result is a 'stack is overflow' or 'Access violation reading location...'. ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.