Solved

Load resources from DLLs

Posted on 1997-07-15
5
149 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
[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
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

734 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