Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Res Files From Dll

Posted on 2006-11-22
4
Medium Priority
?
186 Views
Last Modified: 2010-04-05
I have a dll that contains a reference to several RES files.

I can obtain the data from the res files using TResourceStream.Create and TResourceStream.SaveToFile.

How can I make the data from the res files available to the aplication at runtime as if the res file had been included in the exe using the {$R *.Res] directive?

The res files contain btrieve table structures and I don't want to have to recompile the app each time a field or index is changed hence the use of a dll

I've tried LoadResource and some other stuff but I can't get it to work!!

All help greatly recieved.
0
Comment
Question by:147break
[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
4 Comments
 
LVL 4

Accepted Solution

by:
Meldrachaun earned 1200 total points
ID: 18110483
The first parameter to LoadResource is the handle to the module where the resource resides.  To get the data from a DLL, you need the handle to the DLL.  If you load the DLL using the LoadLibrary command, call LoadResource with the handle you get from LoadLibrary.  If you are using static binding for the DLL (i.e. just using the external keyword in function or procedure definitions), get the handle to the DLL by calling GetModuleHandle, passing in the name of the DLL as a parameter.
0
 

Author Comment

by:147break
ID: 18616210
Many thanks for your reply.
Sorry for the delay in responding. I have not had time to look in to this yet but am replying to keep
the queston active. I hope to look at this shortly.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 21135798
Forced accept.

Computer101
EE Admin
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

721 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