分享
 
 
 

VBCOM TUTORIAL(1)

王朝vb·作者佚名  2006-01-08
窄屏简体版  字體: |||超大  

Introduction

This web-based tutorial will guide you through a tour of the Microsoft Component Object Model (COM) from the perspective of Visual Basic. It is not intended to be a comprehensive coverage of VB COM but an introduction. Our goals are the following:

To help you understand the motives behind COM, and why it has evolved to be the way it is.

To introduce you to object-based programming in general and COM programming in particular, all from the perspective of VB.

To present one of the most important concepts in COM, that of interfaces and interface-based programming

To look behind the scenes of VB and learn about GUIDs, IDL, type libraries and the registry.

To debunk the myth that COM programming is hard.

We assume that you are here because you are already motivated to learn about VB COM. If so, click here to setup your tutorial environment, and then you'll be ready to start! On the other hand, if you would like a little background on the motivations behind COM, continue reading below.

Motivation

Why COM?

COM was originally designed to enable objects to communicate with one another, objects written in different languages and running in different processes. If you stop and really think about this, COM solves a very difficult problem. Firstly, languages such as Visual Basic, C++ and Java have radically different run-time environments, type systems, parameter-passing mechanisms and object formats. Finding a common yet powerful object-oriented framework is not a trivial task. Secondly, in order for processes to communicate, data must be passed back and forth across address space boundaries (marshaled) in a synchronized manner. The calling object needs to block while it awaits completion of the call, and the callee object may need to queue up incoming calls as it completes the current one.

Thus, the first benefit of COM is that it enables the creation of plug-and-play software components. The power of this approach is readily apparent in Visual Basic itself, with its extensible collection of user-interface controls.

Like the object-oriented languages on which it is based, COM was also designed to support the evolution of software components. We all know that software evolves, both in terms of bug fixes and functionality. The question is how best to minimize the impact of change in an existing system. COM's solution is based on a strict adherence to the notion of interface-based programming. As you will see later in this tutorial, interfaces are simply a collection of method signatures. However, software designs based on immutable interfaces are better able to evolve since object implementations can change while remaining backward compatible with existing code. This is the second major benefit to be gained from using COM.

Finally, COM and its infrastructure enable the straightforward construction of distributed applications. COM objects interacting on the same machine can be moved to different machines without any coding changes! This greatly simplifies the development of multi-tier applications, especially when combined with other COM-based technologies such as MTS (Microsoft Transaction Server). Previously known as DCOM (Distributed COM), support for distributed computation is now considered an essential feature of COM and thus no longer carries a separate moniker.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有