Dynamic Resource Binding

I want to bind a .RES file to a DLL on run time. How can I do it?

Note: DLL is not loaded and can be modify and no any resource binded to it.
LVL 2
kambizAsked:
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.

kambizAuthor Commented:
Adjusted points to 75
0
kambizAuthor Commented:
Sorry, I know 75 points is not enough for this question but it's my points total.
0
nietodCommented:
In windows NT, you can use BeginUpdateResrouce(), UpdateResource(), and EndUpdateResource() to do this.  Window 9x does not provide these features.

I suppose, you could simply invoke a linker to link the res file into the DLL.
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

nietodCommented:
FYI, 100 pts is probably about right, so 75 is not an insult.
0
AlexVirochovskyCommented:
kambiz, i don't understand exectly you problem:
you want make from some RES
file Dll in Run time?
  For what? It is very simple
  make Dll, that contains only
 RES data(in BC it is "resource project", that containts only rc/res
data). If you want change something
dinamically, in run time (for example
language or resource: standart target), you simple make some
Dll's (by number of you languages,
for example), and load suit one.
Or you want something other?
0
nietodCommented:
He wants to change the resources stored in the DLL at run-time.
0
AlexVirochovskyCommented:
But for what?
0
kambizAuthor Commented:
I know the Windows NT functions but as you said they don't work on other versions of Windows.

Let I explain what I want to do. I wrote something like MS Office 97 Assistant. I store animations as resource in a dll. I write also an editor to create animations an now I call a resource binder from my editor to create the amimation library.
Now I want to create my library without need of any other tool.

I am going to publish my assistant as freeware.
0
nietodCommented:
You can look at the DLL file format and write procedures to modify the file by inserting additional resources.  its not likely to be very easy to do.

You can find the format documented at

http://www.wotsit.org/index.htm
0
kambizAuthor Commented:
Hi Nietod,

I have visited Wotsit. There is not any document about WIN 32 EXE file format on Wotsit!  

Thanks anyway
0
nietodCommented:
>> There is not any document about WIN 32 EXE file
There are two.  Go to page

http://www.wotsit.org/cgi-bin/search.cgi?windows

and look in the table for EXE.  there are several entries there.  some are for the windows 3.1 EXE file format (PE).  But the last two are for the windows NT/9x file format (NE).  
0
kambizAuthor Commented:
Hi Nietod,

Are you sure?
I saw them again. Yes, there are 4 documents about Windows EXE file format. Three of them specified (3.1) on first line of the document and the last one specified that used Windows 3.1 SDK manual as reference.

Thank you
0
AlexVirochovskyCommented:
For an explanation of the PE format see:
  http://www.microsoft.com/win32dev/base/pefile.htm 
  http://www.wotsit.org/wbinary/exe-win.zip 
  http://www.wotsit.org/wbinary/pe.zip 
Or write you EMail and i 'll send you
article about PE.
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
nietodCommented:
The last two are definitely for the NE format, which is the win32 format.  since win32s was supported on windows 3.1, it is probably also being called the 3.1 formt.  the 2nd one is probably also the NE format.
0
kambizAuthor Commented:
Thanks a lot.
0
nietodCommented:
kambiz, you probably want the NE format, not the PE format.
0
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
C++

From novice to tech pro — start learning today.