' The MyCOMClass type could be written in
' any COM-aware language, and may be located anywhere
' on the network (including your local machine).
Dim obj as MyCOMClass
Set obj = New MyCOMClass ' Location resolved using AppID.
obj.DoSomeWork
Although COM can be considered a very successful object model, it is extremely complex
under the hood (at least until you have spent many months exploring its plumbing—especially if
you happen to be a C++ programmer). To help simplify the development of COM binaries, numer-
ous COM-aware frameworks have come into existence. For example, the Active Template Library
(ATL) provides another set of C++ classes, templates, and macros to ease the creation of COM types.
Many other languages also hide a good part of the COM infrastructure from view. However,
language support alone is not enough to hide the complexity of COM. Even when you choose a
relatively simply COM-aware language such as VB6, you are still forced to contend with fragile regis-
tration entries and numerous deployment-related issues (collectively, and somewhat comically,
termed
DLL hell).
Do'stlaringiz bilan baham: |