Solved

Load DLL from memory unit - how use?

Posted on 2012-03-30
4
1,014 Views
Last Modified: 2012-03-30
Hi guys,
I've found a unit with functions that allow to Load a DLL directly from memory, but I don't know how can I use it..

This is the unit: http://www.delphibasics.info/home/delphibasicssnippets/udllfrommem-loadadllfrommemory

I know that the function is:

function memLoadLibrary(FileBase : Pointer) : Pointer;

Open in new window


But I don't know how can I use it, what is the FileBase that I need to define, etc..

Can anyone help-me?

Thanks.
0
Comment
Question by:Mascarado
  • 2
4 Comments
 
LVL 19

Assisted Solution

by:Thommy
Thommy earned 500 total points
ID: 37788783
With this unit you can load a DLL directly from a bytearray in memory.

FileBase is the pointer to the first array element...
0
 
LVL 19

Accepted Solution

by:
Thommy earned 500 total points
ID: 37788874
With the result of function memLoadLibrary and the Dll function names you can get the function adresses:

Physbase:= memLoadLibrary(apointer);
FunctionBase := memGetProcAddress(Physbase,'ADllFuncName');

Why do you want to load a DLL directly from memory???
0
 

Author Closing Comment

by:Mascarado
ID: 37789143
Helped
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question