Essential Idl: Interface Design for Comby Martin Gudgin, Don Box (Foreword by)
Definition Language (IDL), is an essential topic for all programmers working with COM. Essential IDL offers these programmers a detailed yet accessible description of IDL and its application to COM development projects. The book presents all of the various IDL constructs and offers insight into their purpose and function in interface definitions. In particular, Essential IDL focuses on IDL constructs that support the efficient marshalling of data as performed by the COM interception layer. Taking a top-down approach, this book opens with the basics of defining interfaces and then details data types, pointers and arrays, aliasing, and IDL support for asynchronous COM. Numerous examples of both server-side and client-side programming illustrate concepts and techniques throughout the book. Readers will learn about such key topics as:
- Generating type information
- Building proxy-stub DLLs
- Local and remote interfaces
- Primitive, enumerated, and user-defined data types
- Interface inheritance
- Top-level versus embedded pointers
- Object references and pointers
- Fixed arrays, conformant arrays, and SAFEARRAYS
- Multi-dimensional conformant pointers
- Method and type aliasing
- Asynchronous calls
- Client-side and server-side asynchrony
Also included is a comprehensive and concise reference to IDL built-in data types, modifiers, keywords, and attributes. This combination of comprehensive description, understandable explanation, convenient reference, and practical working guide makes Essential IDL an important resource for all COM programmers.
Read an Excerpt
All developers targeting the Compound Object Model (COM) need a working knowledge of the COM Interface Definition Language (IDL). IDL is a reasonably complex language and can be quite arcane, and acquiring a knowledge of it has been an uphill struggle. This book provides a comprehensive description of IDL and how to use it, making it accessible and understandable. It takes an example-based, top-down approach, laying out the various IDL constructs, why they exist, what they are for, and how and when to use them in interface definitions. In each case, example IDL is provided and, where applicable, source code is provided for client and object in C++ and Visual Basic. The source code examples are not intended to be cut and pasted into existing applications; rather, they illustrate particular points about IDL and its relationship to client and object implementations.
This is a book about COM IDL and hence does not cover IDL keywords, attributes, or other constructs that are usable only from standard Remote Procedure Call (RPC). In addition, the most important parts of IDL are concerned with efficient marshaling of data as performed by the COM interception layer, and the majority of the discussion is based on the IDL constructs that affect the behavior of that interception layer. IDL attributes that have no effect on theinterception layer will for the most part be ignored.
This book represents a significant amount of research on and testing of the various facilities that IDL provides. In some cases, the information presented may be at variance with the official documentation. The author encourages readers to test the assertions in this book for themselves and confirm that they are correct. All testing performed by the author was done using Microsoft IDL (MIDL) compiler Version 5.03.0280. Earlier versions may not support some of the features detailed in this book.
New versions of the MIDL compiler will emerge, and IDL itself will evolve.
One day, IDL per se may disappear completely, but developers will still need to deal with the things that IDL allows them to describe. Given its popularity and general applicability, extensible Markup Language (XML) seems to be an obvious choice as a basis for a description language. To get a head start on the future of IDL (or the IDL of the future), the reader is encouraged to read the W3C Working Draft on XML Schema and the W3C note describing the Simple Object Access Protocol:
Most Helpful Customer Reviews
See all customer reviews