Jump to content

Resource (Windows): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Wisgest (talk | contribs)
→‎Resource software: fixed link to GoRC
m clean up, typo(s) fixed: a executable → an executable
 
(31 intermediate revisions by 24 users not shown)
Line 1: Line 1:
In [[Microsoft Windows]], a '''resource''' is an identifiable, [[file system permissions|read-only]] chunk of [[data (computing)|data]] embedded in an [[executable file]]—specifically a [[portable executable|PE]] file.
{{unreferenced|date=November 2011}}
In [[Microsoft Windows]], '''resources''' are [[file system permissions|read-only]] [[data (computing)|data]] embedded in [[EXE]], [[Dynamic-Link Library|DLL]], [[Control Panel (Windows)|CPL]] or (beginning with Windows Vista) [[Multilingual User Interface|MUI]] files.


Files that contain resources include: [[EXE]], [[Dynamic-link library|DLL]], [[Control Panel (Windows)|CPL]], [[Screen Saver (Windows)|SCR]], [[Device Driver (Windows)|SYS]] and [[Multilingual User Interface|MUI]] files.<ref>{{cite web|url=https://msdn.microsoft.com/en-us/library/windows/desktop/aa380599.aspx|title=About Resource Files|publisher=[[Microsoft]]|accessdate=24 Feb 2014}}</ref><ref>{{cite web|url=https://msdn.microsoft.com/en-us/library/ms648009.aspx|title=Resource Types|publisher=[[Microsoft]]|accessdate=24 Feb 2014}}</ref><ref>{{cite web|url=https://msdn.microsoft.com/en-us/library/cc194804.aspx|title=Windows Resource Files|publisher=[[Microsoft]]|accessdate=24 Feb 2014}}</ref>
The [[Windows API]] provides for easy access to all applications resources.

The [[Windows API]] provides a [[computer program]] access to resources.


==Types==
==Types==
Line 8: Line 9:


Windows has a set of predefined resource types:
Windows has a set of predefined resource types:
* [[Cursor (computers)|Cursor]] and animated cursor
* [[Cursor (user interface)|Cursor]] and animated cursor
* [[Icon (computing)|Icon]]
* [[Icon (computing)|Icon]]
* [[Bitmap]]
* [[Bitmap]]
Line 15: Line 16:
* [[HTML]] document
* [[HTML]] document
* [[String (computer science)|String]] and message template
* [[String (computer science)|String]] and message template
* EXE/DLL file version data
* Version data
* Manifest data
* arbitrary (binary) data


The programmer can also define custom data types in resources.
The programmer can also define custom data types.


==Usage==
==Usage==
The icon that Windows displays for a program file is actually the first icon resource in its EXE file. If the EXE file has no icon resources, a standard icon is displayed.
The icon that Windows displays for an executable program file is the first icon resource in the file. If the file has no icon resources, a standard icon is displayed.


The version resource for EXE and DLL files is displayed in the ''Version'' tab of their property pages.
[[File Explorer]] displays aspects of file's version resource in the ''Version'' tab of a file's properties.


To support [[internationalization and localization]] a resource is associated with a [[natural language]]. An application can be internationalized by associating the same identifier to resources that have the same content but localized for different languages. Via [[Multilingual User Interface]], Windows can be setup to use the resource for a selected language.
Resources always have a language attached to them and Windows will automatically use the most fitting language if possible. This allows for programs adapting their language to the locale of the user.


Editors are available that can modify resources embedded in EXE or DLL files. These are typically used to translate all strings of an application to another language, or to modify its icons and bitmaps accordingly.
[[Resource editor|Editor]]s are available that can modify resources embedded in EXE or DLL files. These are typically used to translate all strings of an application to another language, or to modify its icons and bitmaps accordingly.


==References==
==Resource software==
{{reflist}}

{| class="sortable wikitable" width="100%"
|-
!Name
!License
!Price
!x64 support
![[Windows Vista|Vista]] [[Multilingual User Interface|MUI]] aware
!RES/RC support
!Resource update
!In-place editing
|-
| [http://www.codeplex.com/anolis Anolis Resourcer]
| [[GNU General Public License|GPL]]
| Free
| {{yes}}
| {{yes}}
| {{partial|RES only}}
| {{yes}}
| {{no}}
|-
| [http://www.softpedia.com/get/Programming/Debuggers-Decompilers-Dissasemblers/DeDe.shtml DeDe]
| [[Freeware]]
| Free
| {{no}}
| {{no}}
| {{no}}
| {{no}}
| {{no}}
|-
| [http://www.godevtool.com/ GoRC]
| [[Freeware]]
| Free
| {{yes}}
| N/A
| Compiler
| N/A
| N/A
|-
| [http://www.multiextractor.com/ MultiExtractor]
| [[Shareware]]
| $20 to $70
| {{no}}
| {{no}}
| {{no}}
| {{no}}
| {{no}}
|-
| [http://www.microsoft.com/visualstudio Visual Studio]
| [[Proprietary software]]
| $249 to $10,717.99
| {{yes}}
| {{no}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
| [http://www.resedit.net/ ResEdit]
| [[Freeware]]
| Free
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
| [http://www.resource-builder.com/ Resource Builder]
| [[Shareware]]
| $59USD
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
| [[Resource Hacker]]
| [[Freeware]]
| Free
| {{partial|Beta support}}
| {{partial|Beta support}}
| {{partial}}
| {{yes}}
| {{no}}
|-
| [http://www.heaventools.com/ Resource Tuner]
| [[Shareware]]
| $39.99 to $79.99
| {{no}}
| {{yes}}
| {{no}}
| {{yes}}
| {{no}}
|-
| [http://www.heaventools.com/command-line_resource_editor.htm Resource Tuner Console]
| [[Shareware]]
| $199.99USD
| {{yes}}
|
|
| {{yes}}
| N/A
|-
| [http://www.bome.com/Restorator/ Restorator]
| [[Shareware]]
| $80USD
| {{yes}}
| {{no}}
| {{no}}
| {{yes}}
| {{no}}
|-
| [http://www.wilsonc.demon.co.uk/d10resourceeditor.htm XN Resource Editor]
| [[Mozilla Public License|MPL]] with freeware components
| Free
| {{no}}
| {{no}}
| {{partial}}
| {{yes}}
| {{yes}}
|}


==External links==
==External links==
* [http://msdn.microsoft.com/en-us/library/cc194804.aspx MSDN: Windows Resource Files Guide]
* [http://msdn.microsoft.com/en-us/library/cc194804.aspx MSDN: Windows Resource Files Guide]
* [http://msdn.microsoft.com/en-us/library/aa380599%28v=vs.85%29.aspx MSDN: Better Resource File Guide with reference]
* [http://msdn.microsoft.com/en-us/library/aa380599%28v=vs.85%29.aspx MSDN: Better Resource File Guide with reference]
* [http://msdn.microsoft.com/en-us/library/ms648009%28v=VS.85%29.aspx MSDN: Resource Types]


{{Wikibooks|Windows Programming|Resource Script Reference}}
{{Wikibooks|Windows Programming|Resource Script Reference}}

[[Category:Microsoft Windows]]
[[Category:Windows architecture]]

Latest revision as of 01:29, 11 June 2024

In Microsoft Windows, a resource is an identifiable, read-only chunk of data embedded in an executable file—specifically a PE file.

Files that contain resources include: EXE, DLL, CPL, SCR, SYS and MUI files.[1][2][3]

The Windows API provides a computer program access to resources.

Types

[edit]

Each resource has a type and a name, both being either numeric identifiers or strings.

Windows has a set of predefined resource types:

The programmer can also define custom data types.

Usage

[edit]

The icon that Windows displays for an executable program file is the first icon resource in the file. If the file has no icon resources, a standard icon is displayed.

File Explorer displays aspects of file's version resource in the Version tab of a file's properties.

To support internationalization and localization a resource is associated with a natural language. An application can be internationalized by associating the same identifier to resources that have the same content but localized for different languages. Via Multilingual User Interface, Windows can be setup to use the resource for a selected language.

Editors are available that can modify resources embedded in EXE or DLL files. These are typically used to translate all strings of an application to another language, or to modify its icons and bitmaps accordingly.

References

[edit]
  1. ^ "About Resource Files". Microsoft. Retrieved 24 Feb 2014.
  2. ^ "Resource Types". Microsoft. Retrieved 24 Feb 2014.
  3. ^ "Windows Resource Files". Microsoft. Retrieved 24 Feb 2014.
[edit]