?
Solved

Load DLL from memory unit - how use?

Posted on 2012-03-30
4
Medium Priority
?
1,035 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 19

Assisted Solution

by:Thommy
Thommy earned 1500 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 1500 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

771 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