GetWiki
OLE Automation
ARTICLE SUBJECTS
being →
database →
ethics →
fiction →
history →
internet →
language →
linux →
logic →
method →
news →
policy →
purpose →
religion →
science →
software →
truth →
unix →
wiki →
ARTICLE TYPES
essay →
feed →
help →
system →
wiki →
ARTICLE ORIGINS
critical →
forked →
imported →
original →
OLE Automation
please note:
- the content below is remote from Wikipedia
- it has been imported raw for GetWiki
{{manual|date=January 2012}}In Microsoft Windows applications programming, OLE Automation (later renamed to simply AutomationWEB,weblink Automation (MFC), Microsoft Corporation, MSDN, BOOK, KruJ., Wingo, Scott, Shepherd, George, 1998, Programming Microsoft Visual C++ 6.0, 5th, Chapter 25: Automation, Microsoft Press, Redmond, WA, 978-1-57231-857-1,weblink ) is an inter-process communication mechanism created by Microsoft. It is based on a subset of Component Object Model (COM) that was intended for use by scripting languages – originally Visual Basic – but now is used by several languages on Windows. All automation objects are required to implement the IDispatch interface. It provides an infrastructure whereby applications called automation controllers can access and manipulate (i.e. set properties of or call methods on) shared automation objects that are exported by other applications. It supersedes Dynamic Data Exchange (DDE), an older mechanism for applications to control one another.WEB,weblink Using OLE Automation to Control WordPerfect, 1997, Gordon McComb, 2006-07-20,weblink" title="web.archive.org/web/20170815034739weblink">weblink 2017-08-15, dead, — McComb describes how to use OLE Automation instead of DDE to control WordPerfect As with DDE, in OLE Automation the automation controller is the "client" and the application exporting the automation objects is the "server".Contrary to its name, automation objects do not necessarily use Microsoft OLE, although some Automation objects can be used in OLE environments. The confusion has its roots in Microsoft's earlier definition of OLE, which was previously more or less a synonym of COM.- the content below is remote from Wikipedia
- it has been imported raw for GetWiki
Advantages and limitations
To ensure interoperability, automation interfaces are limited to use a subset of all COM types.Microsoft MSDN: oleautomation attributeMicrosoft MSDN: Automation-Compatible Types Specifically, automation interfaces must use SAFEARRAY instead of raw COM arrays.Automation-compatible COM servers can, however, rely on the in-built OLE marshalling implementation.Microsoft MSDN: Marshaling Details (COM) Type Library Marshaling community additions This avoids the need for additional proxy/stub projects for marshalling out-of-process.Usage
Automation was designed with the ease of scripting in mind, so controllers often provide languages such as Visual Basic for Applications to end users, allowing them to control automation objects via scripts. Automation objects are often written in conventional languages such as C++,WEB,weblink OLE Automation for C++ programmers, Chris Oakley, where C++ attributes can be used to simplify development,MSDN Magazine: C++ Attributes: Make COM Programming a Breeze with New Feature in Visual Studio .NET Languages such as Visual Basic and Borland Delphi also provides a convenient syntax for Automation which hides the complexity of the underlying implementation.Type libraries
In order to automate an application, the developer of an automation controller must know the object model that is employed by the target application exporting activation objects.WEB,weblink OLE Automation in JavaScript, WebReference, Yehuda Shiran and Tomer Shiran, — despite the title, the article discusses JScript rather than JavaScript This requires that the developer of the target application publicly document its object model. Development of automation controllers without knowledge of the target application's object model is "difficult to impossible".JOURNAL,weblink OLE — Extending the Capabilities of PowerBuilder (Part 2), Bruce Armstrong, 2006-01-16, PowerBuilder Developers' Journal, 12, 11, Due to these complications, Automation components are usually provided with type libraries, which contain metadata about classes, interfaces and other features exposed by an object library. Interfaces are described in Microsoft Interface Definition Language. Type libraries can be viewed using various tools, such as the Microsoft OLE/COM Object Viewer (oleview.exe, part of the Microsoft Platform SDK) or the Object Browser in Visual Basic (up to version 6) and Visual Studio .NET. Type libraries are used to generate Proxy pattern/stub code for interoperating between COM and other platforms, such as Microsoft .NET and Java. For instance, the .NET Framework SDK includes tools that can generate a proxy .NET DLL to access Automation objects using both early binding (with information about interfaces extracted from a type library) and late binding (via IDispatch, mapped to the .NET Reflection API), with the built-in .NET-to-COM bridge called COM Interop.BOOK, Appleman, Dan, 2001, Moving to VB.NET: Strategies, Concepts, and Code, Chapter 15: COM Interop and Accessing the Win32 API, Apress, 978-1-893115-97-2,weblink While Java lacks built-in COM support, toolsets like JACOBWEB,weblink The JACOB Project, 2004-10-17, and jSegueWEB,weblink jSegue, 2005-12-14, can generate proxy source code (consisting of two parts, a set of Java classes and a C++ source for a Java Native Interface DLL) from type libraries. These solutions only work on Windows. Another Java based j-InteropWEB,weblink j-Interop Java COM interoperability from any platform, library which enables interoperability with COM components without JNI, using DCOM wire protocol (MSRPC) and works on non-Windows platforms also.Microsoft has publicly documented the object model of all of the applications in Microsoft Office,WEB, Microsoft Corporation, KnowledgeBase, How to find and use Office object model documentation,weblink and some other software developers have also documented the object models of their applications. Object models are presented to automation controllers as type libraries, with their interfaces described in ODL.Language support
Automation is available for a variety of languages, including, but not limited to:{{Div col|colwidth=24em}}- ABAP
- C
- C++ (with Compiler COM Support,WEB,weblink Compiler COM Support, Microsoft, MSDN, or with libraries like MFC or ATL)
- C
- Visual Basic and Visual Basic for Applications
- Visual FoxPro
- dBASE (via OleAutoClient class)
- DelphiWEB,weblink OLE Automation using Delphi, About.com,
- Microsoft .NET languages
- APL (most Windows versions)
- Java (only with third-party tools)
- JScript and VBScript
- Open Object RexxWEB,weblink Open Object Rexx,
- PerlJOURNAL,weblink Win32::OLE, Jan Dubois, The Perl Journal, 3, 2, Summer 1998,
- PHPWEB,weblink PHP: COM and .Net (Windows), The PHP Group, 2006-07-25,
- PowerBuilder
- PythonWEB,weblink Python for Windows Extensions, Mark Hammond, WEB,weblink Comtypes Python package, Sourceforge,
- Ruby (via the 'win32ole' library included in the standard Ruby 1.8.x or later distribution)
- TclWEB,weblink OLE from a Tcl perspective, Tcl programmers,
- Visual DataFlex
- WinBatchWEB,weblink OLE TUTORIAL WINBATCH OLE PROGRAMMING, Stan Littlefield,
See also
References
{{Reflist}}Further reading
- BOOK,
- BOOK,
- BOOK,
- BOOK,
External links
- weblink" title="web.archive.org/web/20120208104440weblink">OLE Automation General paper on the introduction and problems implementing OLE.
- "VOLE - A Neat C++ COM/Automation Driver" â an open-source, compiler-independent C++ COM Automation driver library, for use when having to drive IDispatch directly. VOLE is highly robust, fully encapsulates all "low-level" aspects of IDispatch, and is very flexible, taking and returning normal C++ types.
- content above as imported from Wikipedia
- "OLE Automation" does not exist on GetWiki (yet)
- time: 2:48pm EDT - Thu, Apr 25 2024
- "OLE Automation" does not exist on GetWiki (yet)
- time: 2:48pm EDT - Thu, Apr 25 2024
[ this remote article is provided by Wikipedia ]
LATEST EDITS [ see all ]
GETWIKI 23 MAY 2022
The Illusion of Choice
Culture
Culture
GETWIKI 09 JUL 2019
Eastern Philosophy
History of Philosophy
History of Philosophy
GETWIKI 09 MAY 2016
GetMeta:About
GetWiki
GetWiki
GETWIKI 18 OCT 2015
M.R.M. Parrott
Biographies
Biographies
GETWIKI 20 AUG 2014
GetMeta:News
GetWiki
GetWiki
© 2024 M.R.M. PARROTT | ALL RIGHTS RESERVED