查了以前的帖子,Haor说在服务器端启动automation manager,请问在Win2000中哪里启动?
错误也有“在本地机上未注册类”,请问如何在客户机上注册DCOM组件?我在客户机上用DCOMCNFG配置,可是找不到该应用程序信息,如何配置客户机?

解决方案 »

  1.   

    可以在客户程序时使用createobject中的第二个参数来指定服务器地址,也可以使用clireg32.exe在客户端注册部件。这个程序在vb光盘有,自己搜一搜。
    btw:使用dcomcnfg.exe也可以在客户端设置dcom部件,要比automation manager更为强大。在服务器上面除了安全方面别的不需要特别的配置(必须使用dcomcnfg配置)
      

  2.   

    请问bucher,怎么在客户端用dcomcnfg配置,比如服务器端组件是TestCom.testclass
    在客户端用dcomcnfg怎么加入注册表,我找不到到该应用程序信息
      

  3.   

    //from MSDN
    DCOM: Demonstrates Remotely Calling a COM ObjectThis sample demonstrates how to call a COM object implemented in a Windows NT service from multiple clients running on different machines. It is composed of three parts: DrawServ — The Windows NT service that implements the COM object.
    ATLDraw — The client that connects to the DrawServ COM object. 
    DrawCtl — A control version of ATLDraw. 
    Running the SampleFor this sample to work, all machines must be running Windows NT 4.0 or later. Build the DrawServ, ATLDraw, and DrawCtl samples.
    Copy the DrawServ.exe and ATLDraw.exe or DrawCtl.dll to each machine on which you want to run the sample. Register the server on each machine by running DrawServ with the command-line argument /RegServer or -RegServer (this is case-insensitive). For example: C:\ATL> DrawServ /RegServer (ATL.DLL must be registered for this to work.) You must copy the server to each client to register the CLSID for the server and the server type library on each client.
    Start the service on the server by using the Services icon in Control Panel.
    Using DCOMCNFG on each client, select the Properties of the DrawServ Class. From the Location tab, select Run application on the following computer. Enter the name of the computer on which you are running the server object.
    Run ATLDraw and select Server. Connect from the menu on each client. Draw on the client window by holding the left mouse button down and dragging a line. The drawn line should appear on each client that is connected to the same server. You can also use the View/Color menu option to change the color for each client. 
    The DRAWSERV sample will not register correctly when its path contains spaces. One solution to this problem is to edit the corresponding .rgs file and add single quotes around all occurrences of %MODULE%. For example, you would change a line containing the following:InprocServer32 = s %MODULE%to the following:InprocServer32 = s '%MODULE%'
      

  4.   

    hehehe,好大一堆。
    如果你是activeEXE,可以使用clireg32 myprog.tlb来注册,看看clireg32的参数你就知道了。如果是activedll,只能用regsvr32注册(目前我只会这样)。