⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 0,1410,26048,00.html

📁 C++builder学习资料C++builder
💻 HTML
字号:
<HTML>



<HEAD>



<TITLE>Problems using dcomcnfg to configure ActiveX library objects (DLLs).</TITLE>



</HEAD>

<BODY>

<table>

 

<TR>

   <td>

  

 

<SPAN CLASS="title3"><b>Problems using dcomcnfg to configure ActiveX library objects (DLLs).</b></SPAN>  

  

		 

  

    <P>  

<BLOCKQUOTE CLASS="abstract"><B>Abstract:</B>Client application fails to make a remote DCOM connection. OLEException: Class not registered</BLOCKQUOTE><P>  

   

  </table>  

Issues relating to configuring DCOM for ActiveX  

Library objects.  

<p>Description of problem:  

<br>After successfully building and registering the server object DLL (e.g.  

ActiveX Library with Automation object),&nbsp; the Client application produces  

a 'Class not found' error message when attempting a remote DCOM connection  

using CreateRemote().&nbsp; Server applications created as executables  

(e.g. Application with Automation object) do not appear to have this problem.  

<p>The crux of this issue is that, in order to make DCOM work, the COM  

object must be properly configured using an external utility.&nbsp; Unfortunately,  

the default utility for configuring DCOM (dcomcnfg.exe) does not seem to  

<i>reliably</i> locate COM library objects (DLLs), but is only able to  

find COM executable object (EXE).&nbsp; Furthermore, even when it does  

display the library, there seems to be no way from within the utility to  

configure the object to make it work.&nbsp; The reason for this is because  

the dcomcnfg utility does not allow specification of a surrogate process  

to host the DLL object for the Inproc Server.  

<p>The workaround is to download and install OLEview (free):  

<p>&nbsp;&nbsp;&nbsp; http://www.microsoft.com/com/resources/oleview.asp 

<p>Now, the critical step is specifying that the implementation utilize  

a surrogate process for hosting the DLL.&nbsp; This may be done in the  

following way:  

<p>&nbsp; 1.&nbsp; Register the DLL using regsvr32  

<br>&nbsp; 2.&nbsp; Run OLEview.  

<br>&nbsp; 3.&nbsp; In the left panel, expand 'All Objects,' and select  

your server object.  

<br>&nbsp; 4.&nbsp; In the right panel, select the 'Implementation' tab.  

<br>&nbsp; 5.&nbsp; Then select the sub-tab 'Inproc Server'  

<br>&nbsp; 6.&nbsp; Check 'Use Surrogate Process'  

<p>This may need to be done on each computer that will be hosting the server.&nbsp;  

You will also need to register the DLL on each system before you can use  

the Client application.&nbsp; Finally, if you receive errors regarding  

access rights, you may need to specify 'Launch Permissions' and 'Access  

Permissions' in OLEview. 

</body> 

  

</HTML> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -