[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 540
  • Last Modified:

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.
0
kambiz
Asked:
kambiz
  • 7
  • 6
  • 3
1 Solution
 
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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
 
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

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 7
  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now