Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Dynamic Resources outside of the EXE or DLL

Posted on 1997-03-30
6
Medium Priority
?
294 Views
Last Modified: 2008-03-17
Is there a way of loading a resource that is contained in a file other than an EXE or DLL.  I am using MFVC++ 4.2.  The file could contain any resource type  but must be in a file tah can be easily updated from a server application.  This info is used by the client front end to build a form window for user input.
0
Comment
Question by:GDRichards
[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
  • 3
  • 2
6 Comments
 
LVL 23

Expert Comment

by:chensu
ID: 1162510
For DLLs, you can call LoadLibrary, FindResource and LoadResource. For EXEs, you can call GetFileResource, GetFileResourceSize. Check with the SDK documentation for more information.

0
 

Author Comment

by:GDRichards
ID: 1162511
Edited text of question
0
 

Author Comment

by:GDRichards
ID: 1162512
Sorry good try,  but I know of these and the ones you mentioned are not available in the Win32Api,  I have revised the wording to  make the question more understandable.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 23

Expert Comment

by:chensu
ID: 1162513
There is no standard way to do so. You need to know the resource format. I wonder how you write the resource into a file if you do not know how to load it.

0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 400 total points
ID: 1162514
You can use UpdateResource (under NT only) to change a resource for another exe or dll, so rather than have the client read a resource generated by the server the server (or some other app) could directly modify the resources of the client app.A simpler alternative...If you only want dialog resources, then you could simply write out a DLGTEMPLATE structure to a file in the server and read it back in with the client and use CDialog::CreateIndirect - or have the client generate a DLGTEMPLATE based on info supplied by the server (this is probably nicer because the client can make intelligent decision about how the dialog will look, and less information can be sent from server to client if you code it nicely)
0
 

Author Comment

by:GDRichards
ID: 1162515
Good thought,  will have to give that a go,  but judt for the record the client will use these resources from a file locally,  but also the server could update these files on the fly when a new version is produced.
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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
Suggested Courses

636 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