In
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, a resource is an identifiable,
read-only chunk of
data
Data ( , ) are a collection of discrete or continuous values that convey information, describing the quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpreted for ...
embedded in an
executable file
In computer science, executable code, an executable file, or an executable program, sometimes simply referred to as an executable or binary, causes a computer "to perform indicated tasks according to encoded instructions", as opposed to a da ...
—specifically a
PE file.
Files that contain resources include:
EXE
Exe or EXE may refer to:
* .exe, a file extension
* exe., abbreviation for Executive (disambiguation)#Role, title, or function, executive
Places
* River Exe, in England
* Exe Estuary, in England
* Exe Island, in Exeter, England
Transportation a ...
,
DLL,
CPL,
SCR,
SYS and
MUI files.
The
Windows API
The Windows API, informally WinAPI, is the foundational application programming interface (API) that allows a computer program to access the features of the Microsoft Windows operating system in which the program is running. Programs can acces ...
provides a
computer program
A computer program is a sequence or set of instructions in a programming language for a computer to Execution (computing), execute. It is one component of software, which also includes software documentation, documentation and other intangibl ...
access to resources.
Types
Each resource has a type and a name, both being either numeric identifiers or strings.
Windows has a set of predefined resource types:
*
Cursor and animated cursor
*
Icon
An icon () is a religious work of art, most commonly a painting, in the cultures of the Eastern Orthodox, Oriental Orthodox, Catholic Church, Catholic, and Lutheranism, Lutheran churches. The most common subjects include Jesus, Mary, mother of ...
*
Bitmap
In computing, a bitmap (also called raster) graphic is an image formed from rows of different colored pixels. A GIF is an example of a graphics image file that uses a bitmap.
As a noun, the term "bitmap" is very often used to refer to a partic ...
*
Dialog box
In computing, a dialog box (also simply dialog) is a graphical control element in the form of a small window that communicates information to the user and prompts them for a response.
Dialog boxes are classified as " modal" or "modeless", dep ...
template
*
Font
In metal typesetting, a font is a particular size, weight and style of a ''typeface'', defined as the set of fonts that share an overall design.
For instance, the typeface Bauer Bodoni (shown in the figure) includes fonts " Roman" (or "regul ...
*
HTML
Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
document
*
String
String or strings may refer to:
*String (structure), a long flexible structure made from threads twisted together, which is used to tie, bind, or hang other objects
Arts, entertainment, and media Films
* ''Strings'' (1991 film), a Canadian anim ...
and message template
* Version data
* Manifest data
* arbitrary (binary) data
The programmer can also define custom data types.
Usage
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
File Explorer, previously known as Windows Explorer, is a file manager application and default desktop environment that is included with releases of the Microsoft Windows operating system from Windows 95 onwards. It provides a graphical user i ...
displays aspects of file's version resource in the ''Version'' tab of a file's properties.
To support
internationalization and localization
In computing, internationalization and localization (American English, American) or internationalisation and localisation (British English, British), often abbreviated i18n and l10n respectively, are means of adapting to different languages, regi ...
a resource is associated with a
natural language
A natural language or ordinary language is a language that occurs naturally in a human community by a process of use, repetition, and change. It can take different forms, typically either a spoken language or a sign language. Natural languages ...
. 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 set up to use the resource for a selected language.
Editors such as
Resource Hacker or
Resource Tuner
Resource Tuner is a shareware application developed by Heaventools Software for viewing and editing resources in executable files of the PE (Portable Executable) format, such as .exe and .dll, which are used in 32-bit and 64-bit versions of Mic ...
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
External links
MSDN: Windows Resource Files GuideMSDN: Better Resource File Guide with reference
{{Wikibooks, Windows Programming, Resource Script Reference
Windows architecture