请问有谁知道如何在两台机器上配置DCOM服务器与客户端.
我使用的两台PC的OS是WIN2000 professional,无DNS。
我按照Microsoft给的说明配置后,客户端在连接服务器时
不能成功。返回出错信息是“类厂不支持的类型”,但是如
果客户端与服务器在同一台PC上,则无任何问题。该Demo是
由MSDN提供的。我的EMAIL是[email protected].谢谢!
下面附上Microsoft的配置说明:
DCOM SampleThis sample demonstrates how to call a COM object implemented in an NT service from multiple clients running on different machines. It is composed of two parts: 1.DrawServ - This is the NT service that implements the COM object.
2.ATLDraw - This is the client that connects to the DrawServ COM object.
3.DrawCtl - This is a control version of ATLDraw. It has a Connect method (that takes a machine name string parameter), a Disconnect method and a Clear method.
4.MFCCont - This is a MFC container for DrawCtl -- enter the name of the (possibly remote) server without quotes or slashes.
5.ATLCont - This is an ATL container for DrawCtl -- enter the name of the (possibly remote) server without quotes or slashes..Instructions Note that for this sample to work all machines must be running NT 4.0 Beta 2 or later. 1. Build the DrawServ and ATLDraw samples.2. Copy the DRAWSERV.EXE and ATLDRAW.EXE to each machine that you want to run the sample from.
Register the server on each machine by running DrawServ with the command-line argument /RegServer
or -RegServer (case-insensitive), for example, DrawServ /RegServer. (REGISTER.DLL must be
registered for this to work.) The reason you must copy the server to each client is because the
CLSID for the server and the server type library need to be registered on the client.3. Start the service on the server by using the Services icon in Control Panel.4. Using DCOMCNFG on each client, select the Properties of the DrawServ Class. From the Location
tab select "Run application on the following computer", then enter the name of the computer that
you are running the server object on. Uncheck the "Run application on this computer" box.5. 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 also connected to the same server. You can also use the View.Color menu option to
change the color for each client. 6. If there is any problem connecting to a remote server (for example, tstcon32.exe does not call
CoInitializeSecurity) run dcomcnfg on the client and open tab "Default Properties". Set "Default
Authentication Level" to None and "Default Impersonation Level" to Anonymous.
我使用的两台PC的OS是WIN2000 professional,无DNS。
我按照Microsoft给的说明配置后,客户端在连接服务器时
不能成功。返回出错信息是“类厂不支持的类型”,但是如
果客户端与服务器在同一台PC上,则无任何问题。该Demo是
由MSDN提供的。我的EMAIL是[email protected].谢谢!
下面附上Microsoft的配置说明:
DCOM SampleThis sample demonstrates how to call a COM object implemented in an NT service from multiple clients running on different machines. It is composed of two parts: 1.DrawServ - This is the NT service that implements the COM object.
2.ATLDraw - This is the client that connects to the DrawServ COM object.
3.DrawCtl - This is a control version of ATLDraw. It has a Connect method (that takes a machine name string parameter), a Disconnect method and a Clear method.
4.MFCCont - This is a MFC container for DrawCtl -- enter the name of the (possibly remote) server without quotes or slashes.
5.ATLCont - This is an ATL container for DrawCtl -- enter the name of the (possibly remote) server without quotes or slashes..Instructions Note that for this sample to work all machines must be running NT 4.0 Beta 2 or later. 1. Build the DrawServ and ATLDraw samples.2. Copy the DRAWSERV.EXE and ATLDRAW.EXE to each machine that you want to run the sample from.
Register the server on each machine by running DrawServ with the command-line argument /RegServer
or -RegServer (case-insensitive), for example, DrawServ /RegServer. (REGISTER.DLL must be
registered for this to work.) The reason you must copy the server to each client is because the
CLSID for the server and the server type library need to be registered on the client.3. Start the service on the server by using the Services icon in Control Panel.4. Using DCOMCNFG on each client, select the Properties of the DrawServ Class. From the Location
tab select "Run application on the following computer", then enter the name of the computer that
you are running the server object on. Uncheck the "Run application on this computer" box.5. 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 also connected to the same server. You can also use the View.Color menu option to
change the color for each client. 6. If there is any problem connecting to a remote server (for example, tstcon32.exe does not call
CoInitializeSecurity) run dcomcnfg on the client and open tab "Default Properties". Set "Default
Authentication Level" to None and "Default Impersonation Level" to Anonymous.
解决方案 »
- MiniFilter在Power User权限下与用户态通信
- 资源的应用(API编程)
- 请问怎么能让list ctrl 接受修改呢?
- ATL中集合的顺序问题,高手请救救我呀!
- 在本机上和在局域网上调试网络程序有什么不同吗?
- Win2000下的没有界面的那种程序,运行时怎么能不显示那个黑框?
- 怎样是CStatic的底色为透明的,使其不覆盖下层的颜色?
- 请问有没有了解arm平台的人?
- 什么时候DECLARE_DYNAMIC? 什么时候DECLARE_DYNCREATE?
- 给一个IP地址,怎么样获取它的域名?
- 新手提问:不知有人用过makefile文件了没有(unix下)
- 在帖子http://www.csdn.net/Expert/TopicView2.asp?id=1030414中发言的各位来领奖了。
2.在你的客户端进行注册你的DCOM组件(也就是运行一下你的DCOM)