flat assembler
Message board for the users of flat assembler.
Index
> Windows > My DLL how load my dll not use LoadLibrary & GetProcAdre Goto page 1, 2 Next |
Author |
|
bitRAKE 21 Aug 2013, 15:25
It is exactly the same as system DLLs. Imported functions used need to be added to IAT, along with DLL name.
<See the \EXAMPLES\DLL\LASTERR.ASM within the download.> |
|||
21 Aug 2013, 15:25 |
|
DOS386 21 Aug 2013, 15:59
> My DLL how load my dll not use LoadLibrary & GetProcAdre
Put your DLL into the import area. Check out my DeLL HeLL too : http://board.flatassembler.net/topic.php?t=11170 |
|||
21 Aug 2013, 15:59 |
|
HaHaAnonymous 21 Aug 2013, 16:03
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 20:09; edited 1 time in total |
|||
21 Aug 2013, 16:03 |
|
DOS386 21 Aug 2013, 16:06
> I think he wants to load the DLL by using a different function, i.e.:
> recreate the ordinary Windows' function (a.k.a. the unnecessary hard way). Hog memory, load the file, parse PE structures, resolve imports (recursive deal), ... |
|||
21 Aug 2013, 16:06 |
|
Roman 22 Aug 2013, 04:06
Yes. My DLL use WinAPI function MessageBoxA.
But my loader does not know anything about the MessageBoxA. |
|||
22 Aug 2013, 04:06 |
|
DOS386 22 Aug 2013, 05:44
> But my loader does not know anything about the MessageBoxA.
You can find the function in [AB]USER32.DLL ... check whether it's already loaded (most likely it is) ... load it if not or you want a private copy ... walk through the export name list and find "MessageBoxA" function ... peek it's address and patch it into your EXE importing it ... voila |
|||
22 Aug 2013, 05:44 |
|
Roman 22 Aug 2013, 06:10
I get addres user32.dll.
But how walk the export name list ? |
|||
22 Aug 2013, 06:10 |
|
DOS386 22 Aug 2013, 06:51
Roman wrote: I get addres user32.dll. But how walk the export name list ? You must understand the (flawed, by M$) structure of PE very well. Get some docs about PE, check my DeLL HeLL (see above, it's about it), learn to brew PE, learn to parse PE (MZ header -> PE header -> Optional header -> Directories+Sexions -> RVA of Export Descriptor -> List of function names -> List of Ordinals -> List of function addresses -> Yeah !!! ), search for exports in system DLL's. 1 2 3 4 |
|||
22 Aug 2013, 06:51 |
|
Roman 22 Aug 2013, 07:05
I mean list of functions in USER32.DLL !
I going walk on USER32.DLL names of functions. If we open in WinNotePad the file USER32.DLL. We can find text 'MessageBoxA' But after text 'MessageBoxA' comes the space and new text 'MessageBoxExA' On this basis how do know the actual address the MessageBoxA ? If it was that easy I would have used GetProcAddress and did not suffer. |
|||
22 Aug 2013, 07:05 |
|
DOS386 22 Aug 2013, 07:10
Roman wrote: I mean list of functions in USER32.DLL ! Me too, see previous post. > If we open in WinNotePad the file USER32.DLL. > We can find text 'MessageBoxA' Seems you need a simpler challenge for now, this is too difficult for you. _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
22 Aug 2013, 07:10 |
|
HaHaAnonymous 22 Aug 2013, 13:46
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 20:08; edited 1 time in total |
|||
22 Aug 2013, 13:46 |
|
Roman 22 Aug 2013, 16:00
Please test my programm.
Do not worry no viruses. Write for Windows 7 32 bits. Please write your resultat (work or not).
|
|||||||||||
22 Aug 2013, 16:00 |
|
DOS386 23 Aug 2013, 14:50
> write your resultat
source not found |
|||
23 Aug 2013, 14:50 |
|
Roman 23 Aug 2013, 15:41
DOS386
My programm work on your window ? |
|||
23 Aug 2013, 15:41 |
|
f0dder 23 Aug 2013, 20:42
HaHaAnonymous wrote:
Yep, you're right. Stupid, evil Microsoft - there's no official documentation. _________________ - carpe noctem |
|||
23 Aug 2013, 20:42 |
|
HaHaAnonymous 23 Aug 2013, 21:00
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 20:07; edited 1 time in total |
|||
23 Aug 2013, 21:00 |
|
f0dder 23 Aug 2013, 21:05
HaHaAnonymous wrote:
Yes, I'm being sarcastic - the PECOFF specification has been available for quite a while. And no, it doesn't document corner cases or extreme specifics about bugs and omissions of how the PE loader is implemented in various Windows versions... but the documentation was written for "normal" toolchain implementers, not "let's try to make something smaller than a 512-byte sector" obsessives HaHaAnonymous wrote: And I'm still waiting for your reply on that topic... Not sure if you will reply to (I think no). Which? _________________ - carpe noctem |
|||
23 Aug 2013, 21:05 |
|
AsmGuru62 23 Aug 2013, 21:05
So, you did not download the documentation from MSDN on that link?
Before getting the document -- you must accept the agreement, however. |
|||
23 Aug 2013, 21:05 |
|
Bargest 23 Aug 2013, 21:05
If you follow the link, provided by f0dder, you will download this documentation. I've used it for my COFF parser.
|
|||
23 Aug 2013, 21:05 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.