A loaded DLL in a memory

Here you can find everything you need to know about Dll-Files. You can also share your knowledge regarding the topic.

Moderators: DllAdmin, DLLADMIN ONLY

Post Reply
daniel
Posts: 2
Joined: 01 Aug 2010, 23:00

A loaded DLL in a memory

Post by daniel »

the first, Sorry for my bad english-knowing.


In programming languages there are two import-possible: (import: call a DLL function)

- Static import: When the application start, automatically loaded the DLL, and when the application stopped automatically unload the DLL.
- Dynamic import: Using the Windows's functions: LoadLibrary(), FreeLibrary(), GetProcAddress(), GetProcedureAddress() etc..


I have read tutorials, and i learned: The DLL load into memory once when a application call the DLL. It means: More program uses one DLL. But, I tested and I think this is not true. And I lokked for this, and other tutorials have written: When a DLL call, the DLL load into the application-memory-space, so the DLL is not in the memory once.

But is a problem, because if there are many applications uses the DLL, the result-memory-size is bigger as if I link the DLL's function into application.


So what is a true, and Can I call a DLL's function, to the DLL is be in the memory once?



Thanks, and sorry for my bad English-knowing

advertisement
daniel
Posts: 2
Joined: 01 Aug 2010, 23:00

Post by daniel »

Pleasee somebody

Larkin57

Re: A loaded DLL in a memory

Post by Larkin57 »

I'm developing an application that requires high levels of security and needs to hide certain libraries so that they cannot be detected from file scanning and such.
It isn't a virus or anything malicious but it does need to contain code that is undetectable so to speak.
I thought up a way to do this but am unsure how to complete the final step. For instance, I compiled a DLL, converted the DLL file to a base 64 Encoded String, Encrypted the String and Saved it inside of a new project as a String variable.
Now, when I compile my main application hypothetically it should Decrypt the String to base 64 encoding, decode base 64 into byte array and load the byte array as a library inside of the executable. All of this should be done in memory without file IO during run-time.
The final step of loading the library during run time from raw memory is the step where I am confused. I'm sure this has to be possible. I know that DLLImport command allows external libraries to be loaded but what about libraries built in memory. Could I cast the byte array to an interface and access the code that way?

Post Reply