Skip to Content
Learning DCOM
book

Learning DCOM

by Thuan L. Thai
April 1999
Intermediate to advanced
502 pages
15h 5m
English
O'Reilly Media, Inc.
Content preview from Learning DCOM

The COleDispatchDriver Technique

Now that we have the user interface for the OCRClient application, let’s learn the first technique to communicate with a distributed component: the COleDispatchDriver technique. This technique maps to the TypeLib button of the OCRClient dialog application.

Before we start, let’s first say a few things to recap what we know about type libraries. A type library is a binary file that contains detailed type information of COM classes that are supported by a piece of deployable code called a component. A type library is not a component; it simply contains metadata for interfaces and objects within a component. Although not a component, a type library can be bounded into a component similar to the way a resource can be bounded, so don’t be surprised to see type information in a DLL, an OCX, or an EXE.

Type libraries are built from IDL files by using the library keyword. A type library typically contains, in a nutshell, a library that includes a number of COM classes, each of which may support a number of COM interfaces. In turn, each of these interfaces may have a number of properties and methods. The library, classes, and interfaces are all unique, because they are all tagged with a GUID.

Since type libraries store detailed type information for COM components, a simple tool can easily use type libraries to dynamically discover the definitions for all supported objects and interfaces. The MFC ClassWizard, which is an integrated part of Visual C++, is capable ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

.NET and COM: The Complete Interoperability Guide

.NET and COM: The Complete Interoperability Guide

Adam Nathan
Windows 7 Device Driver

Windows 7 Device Driver

Ph.D. Ronald D. Reeves

Publisher Resources

ISBN: 9781449307011Supplemental ContentErrata Page