Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Shim (computing)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Software that intercepts and modifies behavior}} {{distinguish|text=shm, an abbreviation for [[shared memory]], often pronounced "shim", or a [[CPU shim]], a physical spacer for a heat sink}} {{Other uses|Shim (disambiguation)}} {{refimprove|date=June 2010}} [[File:Texas Instruments Ducati.svg|thumb|The [[Texas Instruments Ducati|TI Ducati]] [[Semiconductor intellectual property core|SIP core]] does video acceleration and accelerated image processing. The actual IC doing the calculations is controlled by software running on two [[ARM Cortex-M3|Cortex-M3]] microcontrollers. The operating system (running on the host CPU) only needs a '''shim''' to interface with the subsystem.]] In [[computer programming]], a '''shim''' is a [[library (computer science)|library]] that [[Transparency_(human–computer_interaction)|transparently]] intercepts [[Application programming interface|API]] calls and changes the arguments passed, handles the operation itself or redirects the operation elsewhere.<ref>{{cite web|publisher=[[Computerworld]]|url=http://www.computerworld.com/s/article/9133382/Your_company_s_apps_incompatible_with_Windows_7_Shim_them_says_Microsoft%26displaylang%3Den|title=Your company's apps incompatible with Windows 7? Shim them, says Microsoft|accessdate=2014-04-05|date=2009-03-21|archive-date=2014-04-07|archive-url=https://web.archive.org/web/20140407082502/http://www.computerworld.com/s/article/9133382/Your_company_s_apps_incompatible_with_Windows_7_Shim_them_says_Microsoft%26displaylang%3Den|url-status=dead}}</ref><ref>{{cite web|publisher=[[Microsoft TechNet]]|url=http://blogs.technet.com/b/askperf/archive/2011/06/17/demystifying-shims-or-using-the-app-compat-toolkit-to-make-your-old-stuff-work-with-your-new-stuff.aspx&displaylang=en|title=Demystifying Shims - or - Using the App Compat Toolkit to make your old stuff work with your new stuff|accessdate=2014-04-05|date=2011-06-17}}</ref> Shims can be used to support an old API in a newer environment, or a new API in an older environment. Shims can also be used for running programs on different software platforms than they were developed for. Shims for older APIs typically come about when the behavior of an API changes, thereby causing compatibility issues for older applications which still rely on the older functionality; in such cases, the older API can still be supported by a thin [[compatibility layer]] on top of the newer code. Shims for newer APIs are defined as: "a [[Library (computing)|library]] that brings a new API to an older environment, using only the means of that environment."<ref name="speakingjs"/> == Examples == * Web [[Polyfill (programming)|polyfill]]s implement newer [[web standard]]s using older standards and [[JavaScript]], if the newer standard is not available in a given [[web browser]].<ref name="speakingjs">{{cite book|title=Speaking JavaScript |url=http://speakingjs.com/ |author=Axel Rauschmayer |year=2014 |at=[http://speakingjs.com/es5/ch30.html#id1267739 Shims Versus Polyfills]}}</ref> * Support of [[AppleTalk]] on [[Apple Macintosh|Macintosh]] computers, during the brief period in which [[Apple Computer]] supported the [[Open Transport]] networking system. Thousands of Mac programs were based on the AppleTalk protocol; to support these programs, AppleTalk was re-implemented as an OpenTransport "stack", and then re-implemented as an API shim on top of this new library. * The [[Microsoft Windows]] Application Compatibility Toolkit (ACT) uses the term to mean [[backward compatibility|backward compatible]] libraries. Shims simulate the behavior of older versions of Windows for legacy applications that rely on incorrect or deprecated functionality, or correct the way in which poorly written applications call unchanged APIs, for example to fix [[Principle of least privilege|least-privileged user account (LUA)]] [[software bug|bug]]s.<ref>{{cite web|publisher=[[Microsoft]]|url=http://www.microsoft.com/downloads/details.aspx?FamilyID=24da89e9-b581-47b0-b45e-492dd6da2971&displaylang=en|title=Microsoft Application Compatibility Toolkit 5.0|accessdate=2008-06-24|date=2007-12-11}}</ref> * bind.so is a shim library for [[Linux]] that allows any application, regardless of permissions, to bind to a listening socket or specify outgoing IP address.<ref>{{cite web|publisher=Daniel Ryde|url=http://www.ryde.net/code/bind.c.txt|title=Source code of bind.so|accessdate=2014-04-05|date=2010-01-09|archive-date=2014-03-30|archive-url=https://web.archive.org/web/20140330151653/http://www.ryde.net/code/bind.c.txt|url-status=dead}}</ref> It uses the [[LD_PRELOAD]] mechanism, which allows shims and other libraries to be loaded into any program. * In the ''type tunnel'' pattern, a generic interface layer uses a family of shims to translate a heterogeneous set of types to a single primitive type used by an underlying API.<ref>{{Citation | last = Wilson | first = Matthew | title = Generalized String Manipulation: Access Shims and Type Tunneling | url = http://www.drdobbs.com/cpp/184401689 | journal = C/C++ Users Journal | volume = 21 | issue = 8 | date = August 2003 }}</ref> == See also == * [[Adapter pattern]] * [[Application virtualization]] * [[Driver wrapper]] * [[Glide wrapper]] * [[Glue code]] * [[Stub (computer science)]] * [[Thunk (compatibility mapping)]] * [[Windows on Windows]] (WoW) * [[Wrapper function]] * [[Wrapper library]] == References == {{reflist|30em}} == External links == * [http://msdn.microsoft.com/en-us/library/windows/desktop/hh848039(v=vs.85).aspx Microsoft Dev-Center - Windows 8 Client and Server 2012 application Compatibility] * [https://technet.microsoft.com/en-us/library/dd837644(v=WS.10).aspx Microsoft TechNet - Understanding Shims] [[Category:Application programming interfaces]] [[Category:Compatibility layers]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Citation
(
edit
)
Template:Cite book
(
edit
)
Template:Cite web
(
edit
)
Template:Distinguish
(
edit
)
Template:Other uses
(
edit
)
Template:Refimprove
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)