flat assembler
Message board for the users of flat assembler.
Index
> Windows > Creating a DLL, and have one of the functions return a chunk |
Author |
|
baldr 16 Jul 2014, 06:35
Foxxy,
You may pass pointer to that memory as an argument to AFunction() (along with its size for sanity check), or you can develop some kind of a protocol, in which returned pointer is expected to be allocated using predefined method, with a clear method to free that memory (e.g. HeapAlloc()/HeapFree()). |
|||
16 Jul 2014, 06:35 |
|
AsmGuru62 16 Jul 2014, 16:50
Just put all your functions into .ASM files and then include the files as needed.
|
|||
16 Jul 2014, 16:50 |
|
Foxxy 16 Jul 2014, 18:56
Okay, can you point me to somewhere where I can learn how to do this? Also, @baldr how would I write to the memory that the pointer is passed to the DLL function? Preferably without using an outside function. I'm sorry if this seems rude or needy, but I can't seem to find anything on the internet regarding DLL creation and large variables.
|
|||
16 Jul 2014, 18:56 |
|
baldr 16 Jul 2014, 20:28
Foxxy,
That's simply a pointer, use it to access memory: Code: proc AFunction, pointer mov eax, [pointer] mov byte [eax], 42 ret endp |
|||
16 Jul 2014, 20:28 |
|
Foxxy 17 Jul 2014, 03:50
Wonderful! Just as I was hoping it would work. Thank you.
|
|||
17 Jul 2014, 03:50 |
|
Roman 17 Jul 2014, 04:33
Code: proc AFunction, pointer mov eax, [pointer] pointer like Code: mov eax, [esp+8] Code: mov eax, [esp+8] the same like mov eax, [pointer] |
|||
17 Jul 2014, 04:33 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.