Cover image for Delphi programming with COM and ActiveX
Delphi programming with COM and ActiveX
Ponamarev, V.
Personal Author:
Publication Information:
Hingham, Mass. : Charles River Media, Inc., [2003]

Physical Description:
viii, 312 pages : illustrations ; 24 cm
General Note:
Includes index.
Format :


Call Number
Material Type
Home Location
Item Holds
QA76.76.D47 P66 2003 Adult Non-Fiction Central Closed Stacks

On Order



Written for Delphi developers and programmers who need to incorporate automation elements and other COM objects into their applications, this book teaches how to use the often-overlooked programming tools of Delphi to create powerful commercial products. It begins by discussing the Delphi integrated development environment, the user interface, and the principles of object-oriented programming. It then moves on to more complex topics such as VCL Delphi libraries, creating components, and creating simple COM objects, servers, and automation dispatchers. There is also information on how to use ActiveX controls in applications and how to create an ActiveX control from VCL Delphi components and forms. KEY FEATURES: Teaches developers how to create commercial quality applications with Delphi Compatible with Delphi 5 and 6 Provides detailed coverage of VCL Delphi libraries, ActiveX controls, and COM objects Covers the Delphi integrated development environment, from the user interface to more sophisticated object-oriented programming principles

Author Notes

V. Ponamarev is an experienced Windows application developer, working primarily with Delphi and Oracle databases

Table of Contents

Introductionp. 1
Intended Audiencep. 2
The Structure of the Bookp. 2
Typographic Conventionsp. 3
Part I Programming in Delphip. 5
Chapter 1 Using Object Pascal and VCL to Develop Windows Applicationsp. 7
Features that Developers will Find in Delphi 5/6p. 8
The Delphi Integrated Development Environment (IDE)p. 15
Generating Source Code: Developing a Simple Applicationp. 25
Object-Oriented Programmingp. 33
Creating and Destroying Objectsp. 38
Delphi Standard Componentsp. 40
The Basic Properties of Delphi Visual Componentsp. 43
Chapter 2 Exceptions and Interfaces in Delphip. 45
Exceptions: What They Are and How to Handle Themp. 46
Handling RTL Exceptions; Exception Hierarchyp. 51
Creating Custom Exceptionsp. 54
Interfaces and Combined Use of them by Various Classesp. 55
The IUnknown Interfacep. 56
Using Interfaces in Distributed Applicationsp. 61
Chapter 3 Threading in Windows Applicationsp. 63
Overview of Threads: General Concepts and Definitionsp. 64
Initializing Threadsp. 68
Using the Main VCL Threadp. 76
Coordinating Threadsp. 78
Synchronizing Threadsp. 79
Starting and Stopping Threadsp. 83
Threading in Distributed Applicationsp. 83
Chapter 4 Working with Packages and Componentsp. 85
Why Use Packagesp. 86
Using Packages in Applicationsp. 87
Dynamic Package Loadingp. 89
Installing Component Packagesp. 92
Creating and Editing Packagesp. 93
The Fundamentals of Package Architecturep. 96
Compiling a Packagep. 97
Chapter 5 Win32 APIp. 99
The Windows Kernel Objects and Processesp. 99
Managing Memory in Win32p. 104
Handling Errors in Win32p. 107
Part II Using VCL and Creating Your Own Delphi Componentsp. 109
Chapter 6 Basic VCL Elementsp. 111
Componentsp. 111
Component Typesp. 112
Component Architecturep. 113
Standard Properties of Delphi Componentsp. 115
Hierarchy of Visual Componentsp. 154
Runtime Type Information (RTTI)p. 156
Chapter 7 Introduction to Component Buildingp. 159
Fundamentals of Component Buildingp. 159
Selecting the Ancestor for Your Componentp. 160
Creating a Shell for a New Componentp. 161
Static Methodsp. 164
Virtual Methodsp. 164
Dynamic Methodsp. 165
Overridden Methodsp. 165
Abstract Methodsp. 166
Chapter 8 Building Componentsp. 167
Adding Properties to a Componentp. 167
Adding Events to a Componentp. 183
Building Methods for a Componentp. 188
Registering Components with Delphip. 189
Part III Application Developing Based on COM and Activex Technologiesp. 191
Chapter 9 COM Basicsp. 193
COM Backgroundp. 194
COM Terminologyp. 195
COM Application Architecturep. 196
Chapter 10 Creating a Simple COM Objectp. 207
Designing a COM Objectp. 208
Chapter 11 Automation Serversp. 215
The IDispatch Interfacep. 216
Late Binding vs. Early Bindingp. 217
Creating an Automation Controllerp. 218
Connecting to an Automation Serverp. 219
Managing an Automation Serverp. 224
Creating an Automation Serverp. 225
Chapter 12 Using ActiveX Controls in Delphip. 233
What is an ActiveX Control?p. 233
Why Use ActiveX Controls?p. 234
Installing an ActiveX Control into the Component Palettep. 234
Chapter 13 Creating ActiveX Controlsp. 237
Designing ActiveX Controlsp. 237
Creating an ActiveX Control from Existing Delphi VCL Componentsp. 238
Creating ActiveX Controls with an ActiveFormp. 267
Chapter 14 Creating MTS Componentsp. 273
MTS Componentsp. 273
Requirements for MTS Componentsp. 275
Creating an MTS Object Using the Wizardp. 275
Appendix Win32 API Error Messagesp. 279
Indexp. 309