Automation (formerly OLE Automation) is a technology that allows you to take advantage of an existing program's functionality and incorporate it into your own applications. For instance, you can utilize the Microsoft Word spelling and grammar checking capabilities into your application without Microsoft Word visible to your users. You can even use all of the Microsoft Excel charting, printing, and data analysis tools. This technology can greatly simplify and speed up your development.
COM and AutomationAutomation is based on the Component Object Model (COM). COM is a standard software architecture based on interfaces, and designed to have code separated into self-contained objects. Think of it as an extension of the Object Oriented Programming (OOP) paradigm, but applicable to separate applications. Each object exposes a set of interfaces, and all communication to an object, such as initialization, notifications, and data transfer, happens through these interfaces.
COM is also a set of services provided by dynamic-link libraries (DLLs) installed with the operating system. Automation uses many of those services. One example is the "Marshalling" service, which packages the client application's calls to the member functions of the server application's interfaces and passes those, with their arguments, to the server application. It makes it appear that the server's interfaces are exposed in the client's memory space, which is not the case when the client is an .exe running in its own process space. Marshalling also gets the return values from the server's methods back across the process boundaries and safely into the hands of the client's call. There are many other services essential to Automation that are provided by the various COM libraries.
COM and AutomationAutomation is based on the Component Object Model (COM). COM is a standard software architecture based on interfaces, and designed to have code separated into self-contained objects. Think of it as an extension of the Object Oriented Programming (OOP) paradigm, but applicable to separate applications. Each object exposes a set of interfaces, and all communication to an object, such as initialization, notifications, and data transfer, happens through these interfaces.
COM is also a set of services provided by dynamic-link libraries (DLLs) installed with the operating system. Automation uses many of those services. One example is the "Marshalling" service, which packages the client application's calls to the member functions of the server application's interfaces and passes those, with their arguments, to the server application. It makes it appear that the server's interfaces are exposed in the client's memory space, which is not the case when the client is an .exe running in its own process space. Marshalling also gets the return values from the server's methods back across the process boundaries and safely into the hands of the client's call. There are many other services essential to Automation that are provided by the various COM libraries.
Type library
A type library is similar to a C/C++ header file. It contains the interfaces, methods, and properties that a server is publishing. You can view the type library with the OLE/COM Object Viewer (Oleview.exe) that comes with Visual C++. Here is a list of the type library filenames for Microsoft Office 95, 97, and 2000:
Office Application | Type library
------------------------+----------------
Word 95 and prior | wb70en32.tlb
Excel 95 and prior | xl5en32.olb
Powerpoint 95 and prior | Powerpoint.tlb
Access 95 and prior | msaccess.tlb
Binder 95 | binder.tlb
Schedule+ | sp7en32.olb
Project | pj4en32.olb
Team Manager | mstmgr1.olb
Word 97 | msword8.olb
Excel 97 | excel8.olb
Powerpoint 97 | msppt8.olb
Access 97 | msacc8.olb
Binder 97 | msbdr8.olb
Graph 97 | graph8.olb
Outlook 97 | msoutl8.olb
Outlook 98 | msoutl85.olb
Word 2000 | msword9.olb
Excel 2000 | excel9.olb
Powerpoint 2000 | msppt9.olb
Access 2000 | msacc9.olb
Outlook 2000 | msoutl9.olb
Word 2002 | msword.olb
Excel 2002 | excel.exe
Powerpoint 2002 | msppt.olb
Access 2002 | msacc.olb
Outlook 2002 | msoutl.olb
A type library is similar to a C/C++ header file. It contains the interfaces, methods, and properties that a server is publishing. You can view the type library with the OLE/COM Object Viewer (Oleview.exe) that comes with Visual C++. Here is a list of the type library filenames for Microsoft Office 95, 97, and 2000:
Office Application | Type library
------------------------+----------------
Word 95 and prior | wb70en32.tlb
Excel 95 and prior | xl5en32.olb
Powerpoint 95 and prior | Powerpoint.tlb
Access 95 and prior | msaccess.tlb
Binder 95 | binder.tlb
Schedule+ | sp7en32.olb
Project | pj4en32.olb
Team Manager | mstmgr1.olb
Word 97 | msword8.olb
Excel 97 | excel8.olb
Powerpoint 97 | msppt8.olb
Access 97 | msacc8.olb
Binder 97 | msbdr8.olb
Graph 97 | graph8.olb
Outlook 97 | msoutl8.olb
Outlook 98 | msoutl85.olb
Word 2000 | msword9.olb
Excel 2000 | excel9.olb
Powerpoint 2000 | msppt9.olb
Access 2000 | msacc9.olb
Outlook 2000 | msoutl9.olb
Word 2002 | msword.olb
Excel 2002 | excel.exe
Powerpoint 2002 | msppt.olb
Access 2002 | msacc.olb
Outlook 2002 | msoutl.olb
0 comments:
Post a Comment