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 ...
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.

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

Regards, Madshi.

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"



Merry Xmas and a bugless Y2K!!!


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

From novice to tech pro — start learning today.