Link to home
Start Free TrialLog in
Avatar of kambiz
kambiz

asked on

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.
Avatar of kambiz
kambiz

ASKER

Adjusted points to 75
Avatar of kambiz

ASKER

Sorry, I know 75 points is not enough for this question but it's my points total.
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.
FYI, 100 pts is probably about right, so 75 is not an insult.
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?
He wants to change the resources stored in the DLL at run-time.
But for what?
Avatar of kambiz

ASKER

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.
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
Avatar of kambiz

ASKER

Hi Nietod,

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

Thanks anyway
>> 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).  
Avatar of kambiz

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of AlexVirochovsky
AlexVirochovsky

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Avatar of kambiz

ASKER

Thanks a lot.
kambiz, you probably want the NE format, not the PE format.