Solved

Load DLL from memory unit - how use?

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi 2 68
Not needed 13 119
Adjust the position 3 65
FMX TEdit KeyUp handler detecting  "enter" key 4 13
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…
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 goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

808 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