<H2 style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 24.1pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-char-indent-size: 12.05pt"><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">這是關(guān)于</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">VB</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中學(xué)習(xí)</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">COM</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的文章</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我在這里發(fā)表一下我的學(xué)習(xí)經(jīng)驗(yàn)</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在我進(jìn)行開發(fā)的過程中</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">經(jīng)常用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">COPY</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的方法</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">來(lái)重用自己的代碼</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果在一處地方有修改</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就不得不在每個(gè)重用代碼的地方進(jìn)行一次修改</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">自從學(xué)習(xí)了對(duì)象編程</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就以后也沒有再用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">COPY</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的方法</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">對(duì)象編程和</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">COM</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">編程我覺得是差不多的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">只是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">COM</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">里面可以含有許多類的定義</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">從現(xiàn)在開始</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">讓</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">COM</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">成為你寫</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">VB CODE</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中的親密朋友吧</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.COM</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就像平時(shí)我們所使用的控件一樣</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是已經(jīng)編譯好的代碼</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以獨(dú)立于某個(gè)應(yīng)用程序發(fā)布</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">它的中文全稱“組件對(duì)象模型</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">”.</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">常見的有</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">activexdll,activex exe,activex</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">控件</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,activex</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文檔等</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">首先要清楚組件概念</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">組件是一些獨(dú)立的程序</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">像VB中的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">FUNCTION</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">SUB,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">每個(gè)組件里面包含聽代碼負(fù)責(zé)完成一項(xiàng)功能</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">把大問題分成小問題來(lái)解決的方法</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">組件之間通過接口來(lái)相互訪問</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">接口提供例如函數(shù)的參數(shù)、返回值等信息</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">供其它組件調(diào)用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">對(duì)象是一個(gè)類的實(shí)例</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一旦對(duì)象建立</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">想訪問對(duì)象的內(nèi)部數(shù)據(jù)必需調(diào)用對(duì)象的接口</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.COM</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是基于客戶和服務(wù)器模型的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">建立對(duì)象實(shí)例的程序稱為客戶端</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">對(duì)象類似服務(wù)器</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可接收和處理各種來(lái)自客戶的請(qǐng)求</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">客戶端和服務(wù)器組件對(duì)象的交流通過三種方式分別是調(diào)用對(duì)象的屬性、方法、事件</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">(</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">以后介紹如何建立一個(gè)類中介紹</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">).</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">還有一個(gè)名稱叫</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">DCOM,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">它是在</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">COM</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上面添加了網(wǎng)絡(luò)協(xié)議</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,COM</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">對(duì)象在遠(yuǎn)程的計(jì)算機(jī)上運(yùn)行</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">運(yùn)行環(huán)境會(huì)自動(dòng)確認(rèn)訪問遠(yuǎn)程象是否允許訪問</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">WINDOW</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">注冊(cè)表中存放有幫助</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">COM</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">運(yùn)行環(huán)境定位并</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">COM</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">對(duì)象</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial"> ,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">這樣</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">COM</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">對(duì)象運(yùn)行好象在本地發(fā)生一樣</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">運(yùn)行的性能部分取決于網(wǎng)絡(luò)環(huán)境</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN lang=EN-US style="COLOR: #333333; FONT-FAMILY: Arial"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></H2>
; Y& b! F; B3 Z; i) h k. E<H2 style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 36.15pt; LINE-HEIGHT: 150%; TEXT-ALIGN: right; mso-char-indent-count: 2.0; mso-char-indent-size: 18.05pt" align=right><SPAN lang=EN-US style="COLOR: #333333; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></H2>0 {+ R0 y$ P/ _1 n1 R+ s
<H2 style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><SPAN lang=EN-US style="COLOR: #333333; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">常見的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">COM</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的儲(chǔ)存文件有擴(kuò)展名為</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">Exe,Dll,ocx .EXE</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件中存放載入內(nèi)存以便運(yùn)行的代碼和加載的基地址信息</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">程序在此基地址上加載</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果此基地址不能加載就會(huì)另覓新的加載地址</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.DLL</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件是包含多個(gè)程序中共享的各種函數(shù)和子程序的集合</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">這些程序可以是進(jìn)程內(nèi)例程</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">ACTIVEX DLL</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">只有此地址空間里面才能訪問</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">也可以是進(jìn)程外例程</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">ACTIVEX EXE,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">要訪問不同的地址空間,需要使用操作系統(tǒng)的調(diào)度技術(shù)</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN lang=EN-US style="COLOR: #333333; FONT-FAMILY: Arial"><o:p></o:p></SPAN></H2>/ f5 q7 B. J. H3 n# w9 j
<H2 style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><SPAN lang=EN-US style="COLOR: #333333; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></H2>
% \. u" S* ~/ X6 m# A<H2 style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><SPAN lang=EN-US style="COLOR: #333333; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></H2>
, \4 A: O! l+ o$ V1 @6 Q+ ~6 _, D<H2 style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><SPAN lang=EN-US style="COLOR: #333333; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">運(yùn)行了一個(gè)程序把運(yùn)行代碼</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">運(yùn)行所需的運(yùn)行庫(kù)加載進(jìn)一個(gè)進(jìn)程的地址空間里</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">通過</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">CPU</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">線程執(zhí)行這些代碼</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">現(xiàn)在我們使用的操作系統(tǒng)能在單</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">CPU</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的硬件環(huán)境上</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">通過有效快速分配</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">CPU</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的時(shí)間點(diǎn)</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">實(shí)現(xiàn)</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">”</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">多線程</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">”</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">技術(shù)</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">也就是說一個(gè)進(jìn)程空間里面有多個(gè)執(zhí)行線程</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">其實(shí)真正一個(gè)時(shí)間點(diǎn)上只有一個(gè)線程被啟動(dòng)</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一個(gè)進(jìn)程實(shí)線了多線程</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">它由一個(gè)主管線程和多個(gè)一般線程組成</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">線程有這樣一個(gè)顯著的特點(diǎn)</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">:</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">每個(gè)線程都能訪問進(jìn)程內(nèi)的資源和自己的堆棧、</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">CPU</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">儲(chǔ)存值</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">而且各個(gè)線程是獨(dú)立運(yùn)作的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: 'Times New Roman'; mso-bidi-font-family: Arial">.</SPAN><SPAN lang=EN-US style="COLOR: #333333; FONT-FAMILY: Arial"><o:p></o:p></SPAN></H2>5 f1 f% ]2 o j! E0 P$ N; c
<H2 style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><SPAN lang=EN-US style="COLOR: #333333; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></H2>
7 ]( ]1 P1 `- k) H0 n9 E: g, n<H2 style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><SPAN lang=EN-US style="COLOR: #333333; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></H2>! z" y5 v8 l+ X6 Y( H
<H2 style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: 'Times New Roman'; mso-bidi-font-family: Arial"> </SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在不同的進(jìn)程和線程之間傳遞請(qǐng)求</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">COM</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中使用是很經(jīng)常的事情</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,WINDOWS</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">管理這些請(qǐng)求叫調(diào)度</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">例如</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">要訪問網(wǎng)絡(luò)上別一計(jì)算機(jī)的一進(jìn)程空間的地址的數(shù)據(jù)</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就是通過進(jìn)程調(diào)度</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">其過程實(shí)現(xiàn)如下</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">:</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">調(diào)用線程把請(qǐng)求發(fā)送到目標(biāo)機(jī)算機(jī)上的進(jìn)程中的主管線程</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">主線程接到請(qǐng)求</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">進(jìn)行處理后</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">返回?cái)?shù)據(jù)給調(diào)用線程</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">調(diào)用線程再返回給用戶</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">,</SPAN><SPAN style="FONT-SIZE: 12pt; COLOR: #333333; mso-bidi-font-family: Arial; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">這樣的方式就像同一進(jìn)程地址訪問一樣了</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: #333333; FONT-FAMILY: Arial">.</SPAN><SPAN lang=EN-US style="COLOR: #333333; FONT-FAMILY: Arial"><o:p></o:p></SPAN></H2> |