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?
 
simonetConnect With a Mentor Commented:
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
 
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
All Courses

From novice to tech pro — start learning today.