| < Free Open Study > |
|
Understand the reasons for using the Interface Definition Language (IDL).
Examine the output files generated by the MIDL compiler.
Learn to define interfaces, coclasses, and type libraries using IDL.
Understand how to define custom enumerations in IDL.
Understand the Visual Basic and Java COM language mappings.
Use C++ smart pointers to simplify client-side COM code.
There are two solid reasons why every COM-based project should begin with the Interface Definition Language (IDL): language independence and location transparency.
IDL is the "official" language of COM that provides a way to specify the functionality of a COM server such that all COM language mappings can access them. In this chapter we will investigate how to create type information for a COM server and how various target languages (specifically VB and Java) can make use of it. We also come to learn how to ease C++ client-side COM development using smart pointer technology.
As for the other benefit of IDL (location transparency), the COM architecture keeps a client encapsulated from a server's actual physical location using stubs and proxies, which are often created using MIDL-generated code, as we will see in Chapter 5.
| < Free Open Study > |
|