flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Nikolay Petrov 09 Jan 2005, 13:56
Please help me
![]() How i export a functions from exe file? thanks in advance |
|||
![]() |
|
vid 11 Jan 2005, 08:27
just like in DLL, create export section/data like you would in DLL
|
|||
![]() |
|
vid 12 Jan 2005, 00:06
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 12 Jan 2005, 18:52
Nickolay,
Why your executable should export functions? Why not to use a DLL? _________________ Code it... That's all... |
|||
![]() |
|
IronFelix 14 Jan 2005, 09:08
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 14 Jan 2005, 21:59
IronFelix it's will be an interesting.
![]() |
|||
![]() |
|
JohnFound 14 Jan 2005, 22:07
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 15 Jan 2005, 20:58
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-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.