Solved

Load DLL from memory unit - how use?

Posted on 2012-03-30
4
1,006 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now