Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Load resources from DLLs

Posted on 1997-07-15
5
Medium Priority
?
155 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 40 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month13 days, 12 hours left to enroll

963 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