??xml version="1.0" encoding="utf-8" standalone="yes"?>国产成人无码精品久久久久免费,欧美无乱码久久久免费午夜一区二区三区中文字幕 ,精品国产乱码久久久久久1区2区http://www.shnenglu.com/woaidongmao/category/15858.html文章均收录自他h博客Q但不喜标题前加-[转脓]Q因其丑陋,见谅Q~zh-cnMon, 10 Jan 2011 05:01:54 GMTMon, 10 Jan 2011 05:01:54 GMT60vc中调用Comlg的方法详?/title><link>http://www.shnenglu.com/woaidongmao/archive/2011/01/10/138250.html</link><dc:creator>肥仔</dc:creator><author>肥仔</author><pubDate>Mon, 10 Jan 2011 04:59:00 GMT</pubDate><guid>http://www.shnenglu.com/woaidongmao/archive/2011/01/10/138250.html</guid><wfw:comment>http://www.shnenglu.com/woaidongmao/comments/138250.html</wfw:comment><comments>http://www.shnenglu.com/woaidongmao/archive/2011/01/10/138250.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/woaidongmao/comments/commentRss/138250.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/woaidongmao/services/trackbacks/138250.html</trackback:ping><description><![CDATA[     摘要: 转蝲自:|络Q来源未知,如有知晓者请告知我。需求:1.创徏myCom.dll,该COM只有一个组?两个接口Q?nbsp;  IGetRes--ҎHello(),   IGetResEx--ҎHelloEx()2.在工E中导入lg或类型库 #import "lg所在目录myCom.dll" no_namespace ?   #import ...  <a href='http://www.shnenglu.com/woaidongmao/archive/2011/01/10/138250.html'>阅读全文</a><img src ="http://www.shnenglu.com/woaidongmao/aggbug/138250.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/woaidongmao/" target="_blank">肥仔</a> 2011-01-10 12:59 <a href="http://www.shnenglu.com/woaidongmao/archive/2011/01/10/138250.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>多h开发的基础---lg化编E?仿COM?/title><link>http://www.shnenglu.com/woaidongmao/archive/2011/01/10/138249.html</link><dc:creator>肥仔</dc:creator><author>肥仔</author><pubDate>Mon, 10 Jan 2011 04:50:00 GMT</pubDate><guid>http://www.shnenglu.com/woaidongmao/archive/2011/01/10/138249.html</guid><wfw:comment>http://www.shnenglu.com/woaidongmao/comments/138249.html</wfw:comment><comments>http://www.shnenglu.com/woaidongmao/archive/2011/01/10/138249.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/woaidongmao/comments/commentRss/138249.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/woaidongmao/services/trackbacks/138249.html</trackback:ping><description><![CDATA[     摘要: 引言Q?    在大型项目的开发中Q随着开发进度的q行Q我们经常碰到模块之间耦合度太高的问题Q由于开发h员经常要在别的模块中调用自己实现的功能,l常随意在某个函C随意d调用代码Q造成了被修改的那个函Cq长Q逻辑混ؕ。另一个问题是随意包含头文Ӟ开发h员在开发中l常Z要用某些类的功能而包含引用类的头文g造成cM间的耦合度太高,被包含类的头文g一处轻微修改经常就...  <a href='http://www.shnenglu.com/woaidongmao/archive/2011/01/10/138249.html'>阅读全文</a><img src ="http://www.shnenglu.com/woaidongmao/aggbug/138249.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/woaidongmao/" target="_blank">肥仔</a> 2011-01-10 12:50 <a href="http://www.shnenglu.com/woaidongmao/archive/2011/01/10/138249.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>什么是COMlg(源于互联|?http://www.shnenglu.com/woaidongmao/archive/2011/01/10/138247.html肥仔肥仔Mon, 10 Jan 2011 04:44:00 GMThttp://www.shnenglu.com/woaidongmao/archive/2011/01/10/138247.htmlhttp://www.shnenglu.com/woaidongmao/comments/138247.htmlhttp://www.shnenglu.com/woaidongmao/archive/2011/01/10/138247.html#Feedback0http://www.shnenglu.com/woaidongmao/comments/commentRss/138247.htmlhttp://www.shnenglu.com/woaidongmao/services/trackbacks/138247.html阅读全文

肥仔 2011-01-10 12:44 发表评论
]]>
如何判断一个COM对象是否可用http://www.shnenglu.com/woaidongmao/archive/2011/01/10/138246.html肥仔肥仔Mon, 10 Jan 2011 04:39:00 GMThttp://www.shnenglu.com/woaidongmao/archive/2011/01/10/138246.htmlhttp://www.shnenglu.com/woaidongmao/comments/138246.htmlhttp://www.shnenglu.com/woaidongmao/archive/2011/01/10/138246.html#Feedback0http://www.shnenglu.com/woaidongmao/comments/commentRss/138246.htmlhttp://www.shnenglu.com/woaidongmao/services/trackbacks/138246.html
By SmartPtr(http://www.shnenglu.com/SmartPtr/)

  同事工作中遇到这个问题,不想在创建对象失败时才知道原来对应的COM对象不可用。自己项目中用到了这个,遂ȝ一下,希望对大家有用?br>  要判断一个COM对象是否有用Q首先要判断该COM对象的CLSID是否在注册表中注册,但注册了q不能保证其可用Q因为如果我误删了该COM对象的蝲?DLL(或exe)Q该COM对象仍然不能正确创徏。所以我们还要判断该载体文g是否存在Q两者都通过了,该COM对象才可正确创徏?br>   直接看代码:
bool IsCOMAvailable(CString strGUID)
{
   
// 1. Try to open the HKEY_CLASSES_ROOT\CLSID\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} key
    CString strKeyName = _T("CLSID\\") + strGUID;
    HKEY hClsidKey;
   
if( ::RegOpenKeyEx( HKEY_CLASSES_ROOT, strKeyName, 0, KEY_QUERY_VALUE, &hClsidKey ) == ERROR_SUCCESS )
    {
       
// 2. Continue to open CLSID\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\InProcServer32\(Default)
        HKEY hInProcServer32Key;
       
if( ::RegOpenKeyEx( hClsidKey, _T( "InProcServer32" ), 0, KEY_QUERY_VALUE, &hInProcServer32Key ) == ERROR_SUCCESS )
        {
            TCHAR tszServerPathName[_MAX_PATH];
            DWORD dwSize
= sizeof( tszServerPathName );
            DWORD dwType;
           
// 3. Get the com dll path
            if( ::RegQueryValueEx( hInProcServer32Key, NULL, NULL, &dwType, (LPBYTE)tszServerPathName, &dwSize ) == ERROR_SUCCESS )
            {
               
if( dwType != REG_SZ )
                   
return false;
               
// 4. If the dll file exist
                CFileFind fileFind;
               
if(fileFind.FindFile(tszServerPathName))
                   
return true;
            }
            ::CloseHandle(hInProcServer32Key);
        }

        ::CloseHandle(hClsidKey);
    }
   
return false;
}


肥仔 2011-01-10 12:39 发表评论
]]>
COM与DLLhttp://www.shnenglu.com/woaidongmao/archive/2011/01/10/138245.html肥仔肥仔Mon, 10 Jan 2011 04:37:00 GMThttp://www.shnenglu.com/woaidongmao/archive/2011/01/10/138245.htmlhttp://www.shnenglu.com/woaidongmao/comments/138245.htmlhttp://www.shnenglu.com/woaidongmao/archive/2011/01/10/138245.html#Feedback0http://www.shnenglu.com/woaidongmao/comments/commentRss/138245.htmlhttp://www.shnenglu.com/woaidongmao/services/trackbacks/138245.htmlcom英文?span lang="EN-US">Component Object ModelQ组件对象模型)Q是微Y生软glg的标准?span lang="EN-US">
它是构造二q制兼容软glg的规范,不管lg应用何种语言~写只要遵@com规范可?span lang="EN-US">
怺直接通信。提?span lang="EN-US">com规范主要是ؓ了满I 
1.E序的快速开发,可以一个大型的工程分成若干?span lang="EN-US">comlg同时开发?
2.可以动态的插入或卸?span lang="EN-US">comlg?
3.可以隐藏或封?span lang="EN-US">comlg内部的实现细节?span lang="EN-US">
comlg可以׃同的语言q行~写Q但comlg之间的通信是通过lg的接口来实现的,
comlg接口的实现是l一的,它采用的是虚拟函数表Q?span lang="EN-US">VTBLQŞ式。虚拟函数表中包含了
lg函数的一l指针,我们可以通过q组指针来获取我们想要通信的组件函数的内存地址?/span> 
dllQ动态链接库Q是包含函数和数据的模块的集合。它可以导出数据也可以导出函C?/span>
其它?span lang="EN-US">dll调用?span lang="EN-US">dll的加载可以通过静态链接和动态链接两U方式?/span> 
1.静态链接时所要链接的dll模块以二q制的Ş式编译进其他模块?
2.动态链接指调用模块在运行时加蝲DLLQ?span lang="EN-US">LoadLibrary函数?span lang="EN-US">LoadLibraryEx
函数?span lang="EN-US">dll 加蝲到进E的地址I间Qƈ调用GetProcAddress函数以获取导出的 DLL 
函数的地址?
动态加?span lang="EN-US">dll的优点: 
1.DLL可节省内存ƈ减少交换。通过在内存中׃n DLL 的单个副本,多个q程可以同时
使用一?span lang="EN-US">DLL。相比之下,对于使用静态链接库构徏的每一个应用程序,Windows 都要
在内存中为其加蝲库代码的一个副本?
2.DLL 可节省磁盘空间?多个应用E序可以׃n盘上的一?span lang="EN-US"> DLL 副本。相比之下,
使用静?链接库构建的每一个应用程序都需要让链接到程序文件映像的库代码作Z?span lang="EN-US">
单独的专用副本?
dll?span lang="EN-US">com的关p:com是一U规范,按照?span lang="EN-US">com规范实现?span lang="EN-US">dll可以被视?span lang="EN-US">comlgQ?/span>
例如我们?span lang="EN-US">mfc建立?span lang="EN-US">Active X控g工程其中的接口封装是?span lang="EN-US">idl描述的所以可以视?span lang="EN-US">
comlg。而且从上面关?span lang="EN-US">com?span lang="EN-US">dll的说明可以看?span lang="EN-US">comlg的接口是一l具有特定规范的
函数Q所?span lang="EN-US">comlg可以别视?span lang="EN-US">dll?span lang="EN-US">dll不一定是comlg?
com?span lang="EN-US">DLL最大的区别是: dll是以函数集合的方式来调用的是~程语言相关?/span>?span lang="EN-US">VC必须
加上extern "C"...?span lang="EN-US">COM是以interface的方式提供给用户使用的是一U二q制的调?span lang="EN-US">
规范,是与~程语言无关?span lang="EN-US">,它?span lang="EN-US">idl接口定义语言来描q自׃用类l承来实现自q功能
和方?span lang="EN-US">.DLL只有DLL一UŞ?span lang="EN-US">,里面可Q意定义函数无限制,只能q行在本Z ?span lang="EN-US">COM 
?span lang="EN-US">DLL?span lang="EN-US">EXE两种存在形势: COM所在的DLL中必d出四个函?span lang="EN-US">: 
dllgetobjectclass, dllregisterserver, dllunregisterserver, 
dllunloadnow 
q四个函数各有作?span lang="EN-US">,有些是提供给COM理器用?span lang="EN-US">,通过CLSID?span lang="EN-US">IID来?span lang="EN-US">,有些是提?span lang="EN-US">
l注册机用的. 
COMl合MTS,COM+, ?span lang="EN-US">DCOM的高U版?span lang="EN-US">,提供了更为强大和安全的分布式COM服务, 
DCOMq行在不同的机器??span lang="EN-US">proxy?span lang="EN-US">stub来实现远E接口的本地映射 二者从执行速度?span lang="EN-US">
?二者相差无?但是启动速度DLL要比COM快!

 



肥仔 2011-01-10 12:37 发表评论
]]>
COMW记-包容与聚?/title><link>http://www.shnenglu.com/woaidongmao/archive/2011/01/10/138244.html</link><dc:creator>肥仔</dc:creator><author>肥仔</author><pubDate>Mon, 10 Jan 2011 04:34:00 GMT</pubDate><guid>http://www.shnenglu.com/woaidongmao/archive/2011/01/10/138244.html</guid><wfw:comment>http://www.shnenglu.com/woaidongmao/comments/138244.html</wfw:comment><comments>http://www.shnenglu.com/woaidongmao/archive/2011/01/10/138244.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/woaidongmao/comments/commentRss/138244.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/woaidongmao/services/trackbacks/138244.html</trackback:ping><description><![CDATA[<p style="margin: 3.75pt 0cm" class="MsoNormal"><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US">COM</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">不支持实现承的原因在于q种l承方式得一个对象的实现同另外一个对象的实现紧紧地关联v来?/span><span style="font-family: 宋体; color: fuchsia; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">在这U情况下Q当基类的实现被修改后,zcd无法正常q行而必被修改</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">。这是Z么一些用</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">C++</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">~写大型E序的专家们强烈ZZ抽象cL构徏应用E序?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"><?xml:namespace prefix = o /><o:p></o:p></span></p> <p style="margin: 3.75pt 0cm" class="MsoNormal"><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">因此Qؓ了保证以lg的修改不会媄响应用程序的正常q行Q?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">COM</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">q不支持实现l承。我们可以用lg</span><span style="font-family: 宋体; color: fuchsia; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">包容</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">来完?/span><span style="font-family: 宋体; color: fuchsia; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">模拟实现l承</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"><o:p></o:p></span></p> <p style="margin: 3.75pt 0cm" class="MsoNormal"><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"> <o:p></o:p></span></p> <h3 style="text-justify: inter-ideograph; text-align: justify; line-height: 13.5pt"><span style="color: red; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">包容和聚?/span><span style="color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"><o:p></o:p></span></h3> <p style="margin: 3.75pt 0cm" class="MsoNormal"><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH"> </span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"> </span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">对一个组件加以扩展或攚w以使符合自q使用需要,q可能会希望用此攚w后的组件来代替原有的组件?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"><o:p></o:p></span></p> <p style="margin: 3.75pt 0cm" class="MsoNormal"><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US">   </span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">C++</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">中,对类的改造是用包容和l承来实现的。在</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">COM</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">中,则可使用包容和聚合来对组件进行改造?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"><o:p></o:p></span></p> <p style="margin: 3.75pt 0cm" class="MsoNormal"><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US">  </span><span style="font-family: 宋体; color: fuchsia; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"> </span><span style="font-family: 宋体; color: fuchsia; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">包容和聚合实际上是用一个组件用别外一个组件的一U技术?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">在包容的情况下,外部lg包?/span><span style="font-family: 宋体; color: black; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">内部lg</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">Q而在聚合的情况下Q则U外部组件聚?/span><span style="font-family: 宋体; color: black; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">内部lg</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"><o:p></o:p></span></p> <p style="margin: 3.75pt 0cm" class="MsoNormal"><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"> <o:p></o:p></span></p> <h3 style="text-justify: inter-ideograph; text-align: justify; line-height: 13.5pt"><strong><span style="font-family: 宋体; color: red; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">包容的简?/span></strong><span style="color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"><o:p></o:p></span></h3> <p style="margin: 3.75pt 0cm" class="MsoNormal"><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">包容是在接口U别完成的。外部组件包含指向内部组件接口的指针。此时外部组件只是内部组件的一个客P它将使用内部lg的接口来实现它自q接口Q见?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">8-1</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"><o:p></o:p></span></p> <p style="margin: 3.75pt 0cm" class="MsoNormal"><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"> <a href="http://www.shnenglu.com/images/cppblog_com/woaidongmao/WindowsLiveWriter/COM_B082/clip_image002_2.gif"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.shnenglu.com/images/cppblog_com/woaidongmao/WindowsLiveWriter/COM_B082/clip_image002_thumb.gif" width="580" height="304" v:shapes="_x0000_i1025"></a><o:p></o:p></span></p> <p style="margin: 3.75pt 0cm" class="MsoNormal"><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US">   </span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">外部lg也可以通过调用{发给内部lg的方法重新实现内部组件所支持的某个接口。ƈ且外部组件还可以在内部组件代码的前后加一些代码以Ҏ口进行改造,见图</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">8-2</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"><o:p></o:p></span></p> <p style="margin: 3.75pt 0cm" class="MsoNormal"><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"> <a href="http://www.shnenglu.com/images/cppblog_com/woaidongmao/WindowsLiveWriter/COM_B082/clip_image004_2.gif"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://www.shnenglu.com/images/cppblog_com/woaidongmao/WindowsLiveWriter/COM_B082/clip_image004_thumb.gif" width="580" height="313" v:shapes="_x0000_i1026"></a><o:p></o:p></span></p> <h3 style="text-justify: inter-ideograph; text-align: justify; line-height: 13.5pt"><strong><span style="font-family: 宋体; color: red; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">包容的实?/span></strong><span style="color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"><o:p></o:p></span></h3> <p style="margin: 3.75pt 0cm" class="MsoNormal"><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">在下面给出的例子中,lg</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">1</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">是一个实C两个接口</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">IX</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">IY</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">的外部组Ӟ但它复用了组?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">2</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">Q组?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">1</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">所包容的一个内部组Ӟ?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">IY</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">的实玎ͼq一点同?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">8-2</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">所C完全是相同的)</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"><o:p></o:p></span></p> <h3 style="text-justify: inter-ideograph; text-align: justify; line-height: 13.5pt"><strong><span style="font-family: 宋体; color: red; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">包容例子</span></strong><span style="color: #333333; font-size: 12pt; font-weight: normal; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"><a target="_blank"><span style="border-bottom: gray 1pt solid; border-left: gray 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; background: white; color: black; border-top: gray 1pt solid; border-right: gray 1pt solid; text-decoration: none; padding-top: 2pt; mso-border-alt: solid gray .75pt; text-underline: none"> </span><span style="border-bottom: gray 1pt solid; border-left: gray 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; background: white; color: black; border-top: gray 1pt solid; border-right: gray 1pt solid; text-decoration: none; padding-top: 2pt; mso-bidi-font-family: 宋体; mso-fareast-language: zh-cn; mso-border-alt: solid gray .75pt; text-underline: none"><o:p></o:p></span></a></span></h3> <h3 style="text-justify: inter-ideograph; text-align: justify; line-height: 13.5pt"><strong><span style="border-bottom: gray 1pt solid; border-left: gray 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; font-family: 宋体; background: white; color: red; font-size: 12pt; border-top: gray 1pt solid; border-right: gray 1pt solid; padding-top: 2pt; mso-bidi-font-family: arial; mso-fareast-language: zh; mso-border-alt: solid gray .75pt" lang="EN-US"><a target="_blank"><span style="color: red; text-decoration: none; text-underline: none">(</span><span style="color: red; text-decoration: none; text-underline: none" lang="ZH">环境</span><span style="color: red; text-decoration: none; text-underline: none">vs2008)</span><span style="border-bottom: medium none; border-left: medium none; color: windowtext; border-top: medium none; border-right: medium none; text-decoration: none; mso-bidi-font-family: 宋体; mso-fareast-language: zh-cn; text-underline: none"><o:p></o:p></span></a></span></strong></h3> <h3 style="text-justify: inter-ideograph; text-align: justify; line-height: 13.5pt"><span style="color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"><o:p> </o:p></span></h3> <p style="margin: 3.75pt 0cm" class="MsoNormal"><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"><a target="_blank"><span style="border-bottom: gray 1pt solid; border-left: gray 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; background: white; color: navy; border-top: gray 1pt solid; border-right: gray 1pt solid; text-decoration: none; padding-top: 2pt; mso-border-alt: solid gray .75pt; text-underline: none" lang="ZH">代码下蝲</span></a></span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">Q?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US">http://www.box.net/shared/lp661oxigu<o:p></o:p></span></p> <p style="margin: 3.75pt 0cm" class="MsoNormal"><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"> <o:p></o:p></span></p> <h3 style="text-justify: inter-ideograph; text-align: justify; line-height: 13.5pt"><strong><span style="font-family: 宋体; color: red; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">聚合?/span></strong><span style="color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"><o:p></o:p></span></h3> <p style="margin: 3.75pt 0cm" class="MsoNormal"><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US">   </span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">聚合是包容的一个特例。外部组件将直接把内部组件的接口指针q回l客戗用此U方法,外部lg无需重新实现q{发接口中的所有函数。见?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">8-3</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">。但q样外部lg无法Ҏ口中的函数进行Q何改造。当外部lg内部组件的接口指针q回l客户之后,客户可以直接同内部lg打交道了。(但是客户不应该知道它是在同两个不同的lg交互Q否则将无法满装的要求。)</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"><o:p></o:p></span></p> <h3 style="text-justify: inter-ideograph; text-align: justify; line-height: 13.5pt"><strong><span style="font-family: 宋体; color: red; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">聚合的实?/span></strong><span style="color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"><o:p></o:p></span></h3> <p style="margin: 3.75pt 0cm" class="MsoNormal"><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">假定客户向外部组件请求接?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">IY</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">。此时外部组件可以不实现</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">IY</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">接口Q而只需内部组件请求查询此</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">IY</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">接口。指针返回给客户。客户可以直接用此指针来调用内部组件所实现的那?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">IY</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">成员。此时就</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">IY</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">接口而言Q外部组件相当于是被架空了;它放弃了?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-fareast-language: zh" lang="EN-US">IY</span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="ZH">接口的控Ӟ而将此控制交l了内部lg?/span><span style="font-family: 宋体; color: #333333; font-size: 12pt; mso-bidi-font-family: arial; mso-fareast-language: zh" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-bidi-font-family: arial" lang="EN-US"><o:p> </o:p></span></p><img src ="http://www.shnenglu.com/woaidongmao/aggbug/138244.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/woaidongmao/" target="_blank">肥仔</a> 2011-01-10 12:34 <a href="http://www.shnenglu.com/woaidongmao/archive/2011/01/10/138244.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>COM原理及应?---分布式COMQDCOMQ?/title><link>http://www.shnenglu.com/woaidongmao/archive/2009/06/29/88751.html</link><dc:creator>肥仔</dc:creator><author>肥仔</author><pubDate>Mon, 29 Jun 2009 02:56:00 GMT</pubDate><guid>http://www.shnenglu.com/woaidongmao/archive/2009/06/29/88751.html</guid><wfw:comment>http://www.shnenglu.com/woaidongmao/comments/88751.html</wfw:comment><comments>http://www.shnenglu.com/woaidongmao/archive/2009/06/29/88751.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/woaidongmao/comments/commentRss/88751.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/woaidongmao/services/trackbacks/88751.html</trackback:ping><description><![CDATA[<p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>1</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">?span lang=EN-US>DCOM<o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span>COM</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">的进E透明Ҏ表现在lg对象和客L序即可以拥有各自的进E空_也可以共享同一个进E空_<span lang=EN-US>COM</span>负责把客L调用正确传到lg对象中,q保证参C递的正确性。组件对象和客户代码不必考虑调用传递的l节Q只要按照一般的函数调用的方式实现即可。如果进一步拓展进E透明Ҏ,考虑lg对象与客L序运行在不同计算Z的情形,把进E透明性拓展ؓ位置透明性,形成分布式组件对象模型,UCؓ<span lang=EN-US>DCOM</span>?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span>DCOM</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">?span lang=EN-US>COM</span>的扩展,它可以支持不同计机上组件对象与客户E序之间或者组件对象之间的怺通信Q这些计机可以在局域网内、广域网上?span lang=EN-US> Internet</span>上。对于客L序而言Q组件程序所处的位置是透明的,我们不必~写M处理q程调用的代码,因此Q?span lang=EN-US>DCOM</span>也是<span lang=EN-US>COM</span>的无~扩展?span lang=EN-US> DCOM</span>处理了底层网l协议的所有细节?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>2</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">、从<span lang=EN-US>COM</span>转向<span lang=EN-US>DCOM<o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">      </span><o:p></o:p></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">q程内组件与客户E序之间的通信q程比较单。本地进E外lg与客L序之间的通信q不是直接进行的Q而是用到了操作系l支持的一些跨q程通信Ҏ?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">      </span><o:p></o:p></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span>DCOM</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">只是单地把本地跨q程通信用一个网l协议传输过E来代替Q只是中间数据传递的路线更长一些。当Ӟ|络通信比单机系l环境下的跨q程通信要脆弱得多,所以ؓ了保证协作过E的可靠性以及程序对异常事g的应变能力,客户E序和组件程序需要考虑更多的细节?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>3</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">?span lang=EN-US>DCOM</span>对象的定?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">客户E序调用<span lang=EN-US>COM</span>库的基础创徏函数Q比?span lang=EN-US>CoGetClassObject</span>Q创E组件对象需要知道远E机器名和对?span lang=EN-US>CLSID</span>?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">有两U方法可以得到远E对象的机器名信息:一是在创徏函数的参C指定<span lang=EN-US>COSERVERINFO</span>l构Q二是?span lang=EN-US>DCOM</span>配置工具指定q程机器名?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span>COM</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">库的创徏函数得到了远E对象的位置信息后,再把对象创徏的Q务交l?span lang=EN-US>SCM</span>Q由<span lang=EN-US>SCM</span>通过<span lang=EN-US>RPC</span>与远E机器进行通信?span lang=EN-US>SCM</span>Q程序名?span lang=EN-US> Rpcss.exe</span>Q也?span lang=EN-US>COM</span>库的一部分Q但它是一个单独的q程?span lang=EN-US>SCM</span>负责创徏新的<span lang=EN-US>COM</span>对象Q也负责建立lg对象与客L序之间的q接。如果要创徏q程对象Q它会通过<span lang=EN-US>RPC</span>调用q程机器上的<span lang=EN-US>SCM</span>Q由q程机器上的<span lang=EN-US>SCM</span>启动lgq程Qƈ创徏lg对象Q然后返回到客户机器?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><o:p> </o:p></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">当然Q远E组件对象被创徏之后Q它在返回到客户机器的途中Q还要经q列集和散集的处理,包括创徏代理对象和装载存根代码等Q这些处理与本地q程外组件对象的处理完全一致。一旦组件对象被创徏完成之后Q客户与lg之间的通信不再l过<span lang=EN-US>SCM</span>Q而是直接通过代理对象和存根对象以?span lang=EN-US>COM</span>库提供的底层传输机制来完成?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>4</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">、列集与散集<span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">列集与散集是实现<span lang=EN-US>COM</span>lg对象跨进E特性的关键技术,它包括标准列集法和自定义列集法。同L技术也适用?span lang=EN-US>DCOM</span>lg对象与客L序之间的通信Q两者的区别在于列集数据包的传递方式有所不同Q对于本地组件对象?span lang=EN-US>LPC</span>传递,而对?span lang=EN-US>DCOM</span>lg对象使用<span lang=EN-US>RPC</span>传递?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span>DCOM</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">提供了一套复杂的列集和散集机Ӟ它徏立在<span lang=EN-US>RPC</span>的基上。由?span lang=EN-US>RPC</span>被定义ؓ<span lang=EN-US>DCE</span>Q分布式计算pȝQ标准的一部分Q?span lang=EN-US>DCE RPC</span>定义了所有常用数据类型的数据表达方式Q即|络数据表示法(<span lang=EN-US>NDR</span>Q?span lang=EN-US>network data representation</span>Q。ؓ了存根代码和代理对象能够正地对参数和q回l果q行列集和散集,它们应该使用一致的数据表示?span lang=EN-US>NDR</span>Q以便在不同的操作系l环境下也能够远E调用?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>5</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">、对?span lang=EN-US>RPC<o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span>DCOM</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">协议也被UCؓ对象<span lang=EN-US>RPC</span>Q?span lang=EN-US>ORPC</span>Q?span lang=EN-US>object remote procedure call</span>Q,它徏立在<span lang=EN-US>DCE RPC</span>协议的基上,可用于各U基于组件的分布式系l?span lang=EN-US>ORPC</span>建立了一套面向对象的q程调用规范Q指定了如何在网l上q行调用、对对象的引用如何表C和如何l护?span lang=EN-US>ORPC</span>协议已经被作?span lang=EN-US>Internet</span>草案递交?span lang=EN-US>IETF</span>Q?span lang=EN-US>Internet Engineering Task Force </span>Q?span lang=EN-US> Internet </span>工程部)?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">?span lang=EN-US>Internet</span>?span lang=EN-US>Intranet</span>|络环境下,<span lang=EN-US>ORPC</span>仍用标准的<span lang=EN-US>RPC</span>数据包,附加上专用于<span lang=EN-US>DCOM</span>的一些信息――接口指针标识符Q?span lang=EN-US>IPID</span>Q?span lang=EN-US>interface point identifier</span>Q、版本信息和扩展信息――作用和q回的附加参数进行传送,其中<span lang=EN-US>IPID</span>表示调用被处理的q程机器上特定对象的特定接口?span lang=EN-US> DCOM</span>客户E序必须周期性地“<span lang=EN-US>pinging</span>”q程机器上的对象Q以便保证客户与对象一直处于连接状态?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>6</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">?span lang=EN-US>DCOM</span>Ҏ?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span>DCOM</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">可以作ؓ分布式应用系l的基本架构Q客L序与<span lang=EN-US>DCOM</span>lg对象之间形成了客P服务器关p,q一步可构成多层软g模型?span lang=EN-US>DCOM</span>lgh<span lang=EN-US>COM </span>lg的一些基本特性,包括重用性、语a无关性等。而位|透明??span lang=EN-US>DCOM</span>的一个基本特性?span lang=EN-US>DCOM</span>的其他特性如下:<span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">Q?span lang=EN-US>1</span>Q可伸羃性。一斚wQ?span lang=EN-US>DCOM</span>利用操作pȝ本n的可伸羃性;另一斚wQ?span lang=EN-US>DCOM</span>提供了灵zȝ配置ҎQ允怸同的lg对象允许在不同的服务器上Q?span lang=EN-US>DCOM</span>的位|透明性保证了q种变化可以不必修改lg源程序?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">Q?span lang=EN-US>2</span>Q可配置性。安装和理是分布式软gpȝ的两个重要环节?span lang=EN-US>DCOM</span>提供了一个图形界面的配置工具E序Q?span lang=EN-US>DCOMCNFG.EXE</span>Q,可客户E序和组件程序在不改变代码的情况下适应不同的网l环境?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">Q?span lang=EN-US>3</span>Q安全性?span lang=EN-US>DCOM</span>使用?span lang=EN-US>Windows NT</span>提供的可扩展安全性框Ӟ在非<span lang=EN-US>NT</span>q_上实现的<span lang=EN-US>DCOM</span>也包括了一个与<span lang=EN-US>NT</span>兼容的安全提供器?span lang=EN-US>DCOM</span>实现的安全性分问安全性和Ȁzd全性,讉K安全性指定那些用户可以调用组件对象,Ȁ发安全性指定哪些用户可以在一个新q程中创建新的对象?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">Q?span lang=EN-US>4</span>Q协议无x?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">  </span><span style="mso-spacerun: yes">     </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">Q?span lang=EN-US>5</span>Q^台独立?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>7</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">、对象激z?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">Ȁz(<span lang=EN-US>activation</span>Q一个组件对象包括两U情形:一是创建新的组件对象,二是建立已有lg对象与客户之间的q接?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span>COM</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">扩展?span lang=EN-US>DCOM</span>之后Q远E对象的创徏q程有所不同。ؓ了标识一个远E对象,仅仅提供一?span lang=EN-US>128</span>位的<span lang=EN-US>GUID</span>q不够,q必L供远E对象所在的机器名,也称E服务器?#8220;<span lang=EN-US>RemoteServerName</span>”?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">Q?span lang=EN-US>1</span>Q创?span lang=EN-US>DCOM</span>lgҎ一<span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">通过<span lang=EN-US>DCOM</span>配置工具指定q程服务器名Q这U方式?span lang=EN-US>DCOM</span>lgh位置透明性。在<span lang=EN-US>Windows</span>pȝq_上,q程服务器名?span lang=EN-US>RemoteServerName</span>D保存在系l注册表<span lang=EN-US>HKEY_CLASSES_ROOT\APPID</span>键下?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">?span lang=EN-US>CLSID</span>?span lang=EN-US>AppID</span>键的l构可以看出Q每?span lang=EN-US>AppID</span>可用于多个组件对象,通常它代表了由多?span lang=EN-US>CLSID</span>׃n的进E,该进E中的所有对象共享同L配置信息Q包括远E服务器名以及安全信息。在<span lang=EN-US>DCOM</span>中引?span lang=EN-US>AppID</span>概念可以避免太多的注册表关键字?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">Q?span lang=EN-US>2</span>Q创?span lang=EN-US>DCOM</span>lgҎ?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">用第一U方法ƈ不是总能满应用的要求,有些应用要求在程序运行过E中控制要连接的服务器,比如多h游戏E序、网l远E管理工L。对于这L应用Q?span lang=EN-US>DCOM</span>允许在创建函C指定q程服务器名字。可以指定远E服务器名字的创建函敎ͼ<span lang=EN-US>CoCreateInstanceEx</span>?span lang=EN-US> CoGetClassObject</span>?span lang=EN-US>CoGetInstanceFromFile</span>?span lang=EN-US>CoGetInstanceFromeIStorage</span>?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">在程序中指定服务器名字的另外一个功能是实现分布式应用系l的动态负载^衡。目?span lang=EN-US>DCOM</span>q很难以实现自动负蝲qҎ,但我们可以徏立一个分z服务组件对象,所有的客户都创建指定机器上的分z服务组件对象,由它创徏另一个真正实现应用功能的q程对象Q在把此q程对象q回l客L序,以后客户E序不再使用分派服务lg对象Q而直接调用远E对象。而分z服务组件对象可以根据当前的负蝲状态,从一l服务器中选择负蝲最ȝ服务器作为目标,创徏q程对象?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><o:p> </o:p></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>8</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">、远E创E内lgQ代理进E(<span lang=EN-US>surrogate</span>Q?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">Zq程q行q程内组件即<span lang=EN-US>DLL</span>lgQ要求在q程机器上有代理q程Q?span lang=EN-US>surrogate process</span>Q。除了可以远E启动进E内lg之外Q代理进E还提供了下面的Ҏ:<span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>l<span style="mso-spacerun: yes">       </span><span style="mso-spacerun: yes">  </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">q程内组件程序中的严重错误只影响代理q程Q不会客户q程崩溃Q?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>l<span style="mso-spacerun: yes">         </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">一个代理进E可以同时ؓ多个客户提供服务Q?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>l<span style="mso-spacerun: yes">         </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">客户可以保护自己避免靠不住的lgE序代码Q只讉KlgE序提供的服务;<span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>l<span style="mso-spacerun: yes">         </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">在代理进E中q行q程内服务可?span lang=EN-US>DLL</span>享有代理q程的安全性?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>Windows</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">引进了缺省的代理q程Q以及编写自定义代理q程的协议规范。缺省实现的代理q程是一个؜合线E模型、伪<span lang=EN-US>COM</span>服务E序。当多个<span lang=EN-US>DLL</span>lg被装入到单个代理q程Ӟ该进E按照注册表中指定的U程模型Ҏ?span lang=EN-US>DLL</span>lg对象q行实例化。如果一?span lang=EN-US>DLL</span>lg对象支持两种U程模型Q则<span lang=EN-US>COM</span>选择自由U程模型?span lang=EN-US>COM</span>卛_以控?span lang=EN-US>DLL</span>lgE序的卸载,也可以终止代理进E?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">如果一个进E内lg满下列条gQ则它将被装入代理进E:<span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>l<span style="mso-spacerun: yes">         </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">pȝ注册表中Q在lg对象?span lang=EN-US>CLSID</span>关键字下必须要指?span lang=EN-US>AppID</span>|以及对应?span lang=EN-US>AppID</span>关键字;<span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>l<span style="mso-spacerun: yes">         </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">客户E序在创建对象实例时Q必设|?span lang=EN-US>CLSTX_LOCAL_SERVER</span>标志Q?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>l<span style="mso-spacerun: yes">         </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">lg对象?span lang=EN-US>CLSID</span>关键字下不指?span lang=EN-US>LocalServer32</span>?span lang=EN-US>LocalServer</span>?span lang=EN-US>LocalService</span>|<span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>l<span style="mso-spacerun: yes">         </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">lg对象?span lang=EN-US>CLSID</span>关键字包?span lang=EN-US>InProvServer32</span>子键Q?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>l<span style="mso-spacerun: yes">         </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">?span lang=EN-US>InProcServer32</span>子键中指定的<span lang=EN-US>DLL</span>文g必须存在Q?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>l<span style="mso-spacerun: yes">         </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">lg对象对应?span lang=EN-US>AppID</span>键下指定<span lang=EN-US>DllSurrogate</span>倹{?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">如果lg对象?span lang=EN-US>CLSID</span>键下?span lang=EN-US>LocalServer</span>?span lang=EN-US>LocalServer32</span>?span lang=EN-US>LocalService</span>值指CZ<span lang=EN-US>EXE</span>的存在,?span lang=EN-US>EXE</span>E序被优先执行Q?span lang=EN-US>COM</span>不再启动代理E序?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>9</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">、利用名字对象(<span lang=EN-US>moniker</span>Q连接到q程对象实例<span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">通常<span lang=EN-US>COM</span>对象实例是不可相互替代到Q或者说不可怺交换的。它通过自己Ҏ的状态区别于同一cȝ其他对象实例?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">在第<span lang=EN-US>8</span>章中介绍?span lang=EN-US>COM</span>命名和绑定机制对于远E对象同样适用?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>10</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">、连接管理——远E对象生存期的控?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span>COM</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">控制对象的生存期最基本的机制是引用计数Q利?span lang=EN-US>IUnknown</span>?span lang=EN-US>AddRef</span>?span lang=EN-US>Release</span>成员函数控制对象的生存期?span lang=EN-US>DCOM</span>优化了远E对象的<span lang=EN-US>AddRef</span>?span lang=EN-US>Release</span>的调用。优化过E用了<span lang=EN-US>OXID</span>Q?span lang=EN-US>object exporter identifier </span>Q对象管理标识符Q对象?span lang=EN-US>OXID</span>是一?span lang=EN-US>64</span>位|通过<span lang=EN-US>OXID</span>可以?span lang=EN-US>RPC</span>串绑定调用到它们的目?span lang=EN-US>IPID</span>。但是,在执行调用之前,调用q程必须?span lang=EN-US> OXID</span>转译成ؓ底层<span lang=EN-US>RPC</span>可以解释的一l绑定?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">在每台支?span lang=EN-US>DCOM</span>的机器上Q都有一个被UCؓ<span lang=EN-US>OXID</span>解析器(<span lang=EN-US>OXID Resolver</span>Q的服务Q它负责向客h供用于连接到<span lang=EN-US>OXID</span>?span lang=EN-US>RPC</span>串绑定信息,也负责接收远E发来的“<span lang=EN-US>pinging</span>”信息?span lang=EN-US>OXID</span>解析器之间通过<span lang=EN-US>RPC</span>q行通信Q它实现?span lang=EN-US>RPC</span>接口<span lang=EN-US>IOXIDResolver</span>Q不?span lang=EN-US>COM</span>接口Q?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">      </span><o:p></o:p></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>11</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">、连接管理—?span lang=EN-US>pinging</span>机制<span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">如果不考虑客户q程可能会非正常l止Q则利用q程引用计数控制对象生存期已l够了。ؓ了检客L序是否非正常l止Q?span lang=EN-US>DCOM</span>提供了一U简单的Ҏ “<span lang=EN-US>pinging</span>”。在现在实现?span lang=EN-US>DCOM</span>版本中,<span lang=EN-US>pingPeriod=2</span>Q分Q且<span lang=EN-US>numPingsToTimeOut=3</span>Q这些g能被改变?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>12</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">、连接管理——连接点理<span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">许多实际的分布式应用都需要在两个对象之间q行双向通信。由?span lang=EN-US>DCOM</span>是对<span lang=EN-US>COM</span>的无~扩展,在第<span lang=EN-US>6</span>章中介绍?span lang=EN-US>COM</span>提供的连接点机制同样适用于远E对象的情Ş?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">      </span><o:p></o:p></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>13</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">、连接管理——连接传?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">用分z服务组件对象来实现分布式应用的负蝲qҎ实际上用到了连接传递特性?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">q接传递不{于q程对象创徏的传递,<span lang=EN-US>DCOM</span>不支持位|透明方式下对象创建的传递过E,但可以利用连接传递特性,通过E序控制服务器名字的方式实现q程对象创徏的传递?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>14</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">、ƈ发管理——线E模?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span>COM</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">本nq没有线E模型,可以认ؓ<span lang=EN-US>COM</span>借用?span lang=EN-US>Windows</span>操作pȝ提供的线E模型,<span lang=EN-US>Win32</span>E序设计模型把线E分?span lang=EN-US>UI</span>U程和辅助线E,相对应地Q?span lang=EN-US>COM</span>把线E分成套间线E和自由U程。套间线E?span lang=EN-US>CoInitialize API</span>函数执行<span lang=EN-US>COM</span>库的初始化,<span lang=EN-US>COM</span>在套间线E内部创Z一个隐藏的H口Q此H口的窗口过E函数负责把客户对套间中的组件对象的调用发送到正确的成员函C?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>15</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">、ƈ发管理——消息过滤器<span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span>COM</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">?span lang=EN-US>DCOM</span>的线E模型我们了解C客户E序与组件对象调用过E中的线E切换,但调用可能会dE序Q甚至得客L序无法正常进行。ؓ此,<span lang=EN-US>COM</span>提供了消息过滤机Ӟ它既可用于客L序,也可用于lgE序Q允许它们对于入调用和出调用有所选择?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span>COM</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">把调用分Zc:W一U是同步调用Q这是最常见的调用类型,客户调用lg对象Q一直等到对象执行完所有功能后再返回;W二U是异步调用Q客戯用组件对象,但不{到对象执行完功能就马上q回Q以后对象通过出接口通知客户E序Q这也就是我们在W?span lang=EN-US>6</span>章介l的可连接对象机ӞW三Uؓ输入同步调用Q被调用对象必须在放弃控制之前返回,以便保证用户界面不受影响Q也是_在调用执行过E中Q对象不能调用Q何可能会q入消息循环的函数?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>16</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">?span lang=EN-US>DCOM</span>安全模型<span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span>DCOM</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">安全性徏立在底层安全提供器基上,有些操作pȝ可以支持多个安全提供器,<span lang=EN-US>DCOM</span>?span lang=EN-US>RPC</span>也可以同时支持多个安全提供器。所有的安全提供器有一个共同点Q它们提供了一U表C安全角Ԍ一般ؓ用户账号Q的Ҏ、一U鉴定安全角Ԍ一般通过口o或私有钥匙)的方法,以及理安全角色和其鉴定数据的一套机制?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>17</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">?span lang=EN-US>DCOM</span>安全模型——安全性策?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">Q?span lang=EN-US>1</span>Q访问安全性和Ȁ发安全性?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">Q?span lang=EN-US>2</span>Q对象的安全w䆾?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">Q?span lang=EN-US>3</span>Q保护数据?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">Q?span lang=EN-US>4</span>Q鉴定别?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span></span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">Q?span lang=EN-US>5</span>Q模仿别?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US>18</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">?span lang=EN-US>DCOM</span>安全模型——安全性配|?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><span style="mso-spacerun: yes">       </span>DCOM</span><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial">提供了多U保护应用程序的ҎQ一斚wQ?span lang=EN-US>DCOM</span>可以强制使用安全性而不用Q何对象或对象的客L序做M工作Q对象的安全性设|可以在外部配置q且<span lang=EN-US>DCOM</span>会自动强制用。另一斚wQ?span lang=EN-US>DCOM</span>把它完整的安全性结构暴露给开发者,因而客户和对象都可以通过E序控制其安全策略?span lang=EN-US><o:p></o:p></span></span></p> <p style="LINE-HEIGHT: 150%" class=MsoNormal><span style="LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; COLOR: black; FONT-SIZE: 12pt; mso-bidi-font-family: arial" lang=EN-US><o:p> </o:p></span></p> <img src ="http://www.shnenglu.com/woaidongmao/aggbug/88751.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/woaidongmao/" target="_blank">肥仔</a> 2009-06-29 10:56 <a href="http://www.shnenglu.com/woaidongmao/archive/2009/06/29/88751.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>лǵվܻԴȤ</p> <a href="http://www.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.ltak.cn" target="_blank">þþþƷþþþɫӰ</a>| <a href="http://www.oceanchemlab.cn" target="_blank">ҹþþӰԺ</a>| <a href="http://www.u24373.cn" target="_blank">޾Ʒþ</a>| <a href="http://www.bmims01.cn" target="_blank">޹˾þһҳ</a>| <a href="http://www.pgt.net.cn" target="_blank">þþƵ</a>| <a href="http://www.dlwz8.cn" target="_blank">AVþþþò</a>| <a href="http://www.tonyifu.cn" target="_blank">þùƷ</a>| <a href="http://www.enetbase.cn" target="_blank">þۺϾɫۺվ</a>| <a href="http://www.kinbay.cn" target="_blank">þþƷר</a>| <a href="http://www.27cv.cn" target="_blank">þþþþùƷ</a>| <a href="http://www.lyscpf.cn" target="_blank">ھƷþþþù</a>| <a href="http://www.23d6.cn" target="_blank">뾫Ʒþþþ..</a>| <a href="http://www.chuangwote.com.cn" target="_blank">99þùۺϾƷˮ</a>| <a href="http://www.diylady.cn" target="_blank">˾þ</a>| <a href="http://www.rvyq.cn" target="_blank">Ʒþþþþ </a>| <a href="http://www.by6463.cn" target="_blank">޹þþþƷС˵</a>| <a href="http://www.9n7.com.cn" target="_blank">99þѹػ</a>| <a href="http://www.zupy.cn" target="_blank">þþþþþþ˳</a>| <a href="http://www.0546bbs.cn" target="_blank">һþaþþƷۺ</a>| <a href="http://www.salhm.cn" target="_blank">þ޾ƷAVӣ</a>| <a href="http://www.hnzzwl.cn" target="_blank">þ̳</a>| <a href="http://www.xy-ly.com.cn" target="_blank">ŮдþӰԺ</a>| <a href="http://www.zgcl.org.cn" target="_blank">ɫ͵͵þһ</a>| <a href="http://www.shopzoom.cn" target="_blank">þþþƷ</a>| <a href="http://www.6ird.cn" target="_blank">þþþ</a>| <a href="http://www.vkbx.cn" target="_blank">˾ҹվھƷþþþþþþ </a>| <a href="http://www.xfqbaby.cn" target="_blank">þþþ99ƷƬţţӰ</a>| <a href="http://www.gven.cn" target="_blank">aëƬþ</a>| <a href="http://www.chiti.com.cn" target="_blank">ɫ͵͵þһ</a>| <a href="http://www.ls63.cn" target="_blank">þùŷպƷ</a>| <a href="http://www.emsyx.cn" target="_blank">߾þþƷĹ</a>| <a href="http://www.dgjiajun.net.cn" target="_blank">޹Ʒþþ</a>| <a href="http://www.minghuzisha.cn" target="_blank">þ99Ʒ99þ</a>| <a href="http://www.itshirts.cn" target="_blank">99þþƷëƬѲ</a>| <a href="http://www.lae.net.cn" target="_blank">þ99׾Ʒ</a>| <a href="http://www.tonghuaguan.cn" target="_blank">޾þþһ</a>| <a href="http://www.wooblog.cn" target="_blank">þù׽</a>| <a href="http://www.07ww.cn" target="_blank">þҹҹݺ</a>| <a href="http://www.mhlz4f.cn" target="_blank">99þùں;Ʒ1ӳ</a>| <a href="http://www.dowee.com.cn" target="_blank">޾þһ</a>| <a href="http://www.abcvi.cn" target="_blank">ŷAŷaþ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>