Solved

Load resources from DLLs

Posted on 1997-07-15
5
142 Views
Last Modified: 2011-10-03
I want to know how to load a ressource from a DLL created with Delphi 3.
For example, with the TAnimate control I want to load a .AVI from my DLL.
0
Comment
Question by:fmichaud061597
  • 2
  • 2
5 Comments
 

Expert Comment

by:chrb
ID: 1338940
Hi!

To load resources you must use the LoadLibrary function to create a handle to the dll. And then read the AVI file.

If you didn't understand just leave me a comment.

Chr
0
 

Author Comment

by:fmichaud061597
ID: 1338941
I understand, but what i need is the source code to load that resources in my TAnimate. like:
Animate1.ResID := 101; <--- this is from resources in .exe so when i got my handle to my DLL what I must do?
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1338942
Can't you get it with LoadResource?

c.u.
ZifNab

0
 

Author Comment

by:fmichaud061597
ID: 1338943
It seems to work but it takes the resource from it's own executable.
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 20 total points
ID: 1338944
Try this (haven't tested it! Just a guess!) :

 DllHandle := LoadLibrary({name.dll});

And use this DllHandle with

 AviHandle := LoadResource(DllHandle, {....});

Have fun,
c.u.
ZifNab;
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

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