Resources question

I have a dll with resouces, How do I read the resources in a procedure in the dll?

In other words make a dll which reads it's own resources ...
LVL 3
hagurAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MadshiCommented:
Well, I'm no expert in these things, but if I remember right, there was a lot info about resources here:

http://www.bhnet.com.br/~simonet/

Regards, Madshi.
0
simonetCommented:
hagur,

There's not one simple method to read resources from modules (modules = DLLs, EXEs, etc). It all depends on the resource type. For example: if you're reading a bitmap resource from a module, you can use the TBitmap's internal LoadFromResource method, but that covers one case. There are plenty of cases.

Fortunatly, most Delphi components that can load data from files can also load data from resources. Just check if the object has the LoadFromResource method.

There's another object that easens the process of handling resources: TResourceStream. It makes things very easy. If the Delphi object doesn't feature a load from resource method, but features the LoadFromStream method, then TResourceStream is quite handy.

I have written a tutorial that serves as a starting point for all those who want to play with resources:

"To to create and use a Resource-only DLL"
http://www.bhnet.com.br/~simonet/howtoprojs.htm

Yours,

Alex

Merry Xmas and a bugless Y2K!!!

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.