# Resource (Windows)

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Resource_(Windows)
> Markdown URL: https://mediated.wiki/source/Resource_(Windows).md
> Source: https://en.wikipedia.org/wiki/Resource_(Windows)
> Source revision: 1346166900
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Read-only file data

In [Microsoft Windows](/source/Microsoft_Windows), a **resource** is an identifiable, [read-only](/source/File_system_permissions) chunk of [data](/source/Data_(computing)) embedded in an [executable file](/source/Executable_file)—specifically a [PE](/source/Portable_executable) file.

Files that contain resources include: [EXE](/source/EXE), [DLL](/source/Dynamic-link_library), [CPL](/source/Control_Panel_(Windows)), [SCR](/source/Screen_Saver), [SYS](/source/.sys) and [MUI](/source/Multilingual_User_Interface) files.[1][2][3]

The [Windows API](/source/Windows_API) provides a [computer program](/source/Computer_program) 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](/source/Cursor_(user_interface)) and animated cursor

- [Icon](/source/Icon_(computing))

- [Bitmap](/source/Bitmap)

- [Dialog box](/source/Dialog_box) template

- [Font](/source/Typeface)

- [HTML](/source/HTML) document

- [String](/source/String_(computer_science)) 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](/source/File_Explorer) displays aspects of file's version resource in the *Version* tab of a file's properties.

To support [internationalization and localization](/source/Internationalization_and_localization) a resource is associated with a [natural language](/source/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](/source/Multilingual_User_Interface), Windows can be set up to use the resource for a selected language.

Editors such as [Resource Hacker](/source/Resource_Hacker) or [Resource Tuner](https://en.wikipedia.org/w/index.php?title=Resource_Tuner&action=edit&redlink=1) 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

1. **[^](#cite_ref-1)** ["About Resource Files"](https://msdn.microsoft.com/en-us/library/windows/desktop/aa380599.aspx). [Microsoft](/source/Microsoft). Retrieved 24 Feb 2014.

1. **[^](#cite_ref-2)** ["Resource Types"](https://msdn.microsoft.com/en-us/library/ms648009.aspx). [Microsoft](/source/Microsoft). Retrieved 24 Feb 2014.

1. **[^](#cite_ref-3)** ["Windows Resource Files"](https://msdn.microsoft.com/en-us/library/cc194804.aspx). [Microsoft](/source/Microsoft). Retrieved 24 Feb 2014.

## External links

- [MSDN: Windows Resource Files Guide](http://msdn.microsoft.com/en-us/library/cc194804.aspx)

- [MSDN: Better Resource File Guide with reference](http://msdn.microsoft.com/en-us/library/aa380599%28v=vs.85%29.aspx)

The Wikibook *[Windows Programming](https://en.wikibooks.org/wiki/Windows_Programming)* has a page on the topic of: ***[Resource Script Reference](https://en.wikibooks.org/wiki/Windows_Programming/Resource_Script_Reference)***

---
Adapted from the Wikipedia article [Resource (Windows)](https://en.wikipedia.org/wiki/Resource_(Windows)) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Resource_(Windows)?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
