-
-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fancycode/MemoryModule #220
Comments
Hello,
The question is more related to the question about assembler
implementation how does it work, and as I remember, PE writer evaluates
SizeOfImage using VA/RVA from the last placed section such .reloc plus
its size rounded up to a multiple of the section alignment. Some of the
alignment, in its turn, may also relies on page size including the
mentioned difference 0x1000 up to the two page size etc, or it was
decoder part, never mind.
In other words, I don't recommend to compare both between (like in your
code above) due to various cases.
The SizeOfImage should be enough to allocate memory for image because
its value must contain evaluated size of the image including all headers
(CLR header is inside the well-known .text section, and so on)
…On 14.02.2023 23:49, Mortan wrote:
and tried call LoadFromMemory from this repo
https://github.com/fancycode/MemoryModule
and got this:
image
<https://user-images.githubusercontent.com/18101486/218858824-3dbdac66-6a14-4a51-8044-443c2e7db82d.png>
But when I try to load the library directly via LoadLibrary everything
works. In this regard, I have a question - why is 4096 missing, is
this error related to the module that I'm trying or probably I made a
mistake when setting some parameters ( DllExport.bat )
Tell me, have I come to the right place or should I redirect this
question to the developers of fancycode module :D
|
I don't see a problem for correct implementation. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce:
. . .
Im write simple DLL with that code:
and tried call LoadFromMemory from this repo https://github.com/fancycode/MemoryModule

and got this:
But when I try to load the library directly via LoadLibrary everything works. In this regard, I have a question - why is 4096 missing, is this error related to the module that I'm trying or probably I made a mistake when setting some parameters ( DllExport.bat )
Tell me, have I come to the right place or should I redirect this question to the developers of fancycode module :D
The text was updated successfully, but these errors were encountered: