win98之间如何用 DCOM 注册连接 应用服务器和客户端(100分)

王彬

Unregistered / Unconfirmed
GUEST, unregistred user!
win98之间如何用 DCOM 注册连接 应用服务器和客户端
我用的环境: 数据库在NT4上 SQL7
应用服务器/客户端 DELPHI4 WIN98
 
我看到的一本delphi教材上是这样讲的:如果服务器和客户端都在
一太机器上,那么是通过寻找注册表来运行和连接服务器。
如果是在网络上,好象是按照分布式结构来处理的,也就是说
会自动又分布式操作系统来完成这个查找。
 
Use Windows 95 or Windows 98 as a DCOM Server
--------------------------------------------------------------------------------
The information in this article applies to:
Microsoft Visual Basic Enterprise Edition for Windows, version 5.0
--------------------------------------------------------------------------------

SUMMARY
To use a Windows 95 or Windows 98 computer as a Distributed Component Object Model (DCOM) server, you need to configure the computer to run DCOM applications. Using a Windows 95 or Windows 98 computer as a DCOM server will not provide the same features as a Windows NT 4.0 computer. Performance and security will be more limited. Additionally, you will have to perform some steps manually that are provided automatically by Windows NT. For instance, you will probably want to add shortcuts to the server components in your startup group and you will need to run RPCSS.EXE before you will be able to access the server component.
Because you need to have the server component running before trying to use the client, you need some mechanism to keep the server running. The easiest way todo
this is to have a blank form in the server. You may set the visible property of the form to "False."

MORE INFORMATION
DCOM was designed to run on Windows NT 4.0 Server and Workstation. DCOM is also intrinsic Windows 98. To configure a Windows 95 computer for use as a DCOM server,do
wnload DCOM95.EXE and DCM95CFG.EXE available from the OLE Development section of the Microsoft Web Site at:
http://msdn.microsoft.com/library/default.htm
DCOM95.EXE is also available on the Microsoft Visual Basic 5.0 CD-ROM (Enterprise, Professional and Standard editions) in the /Pro/Tools/DCOM95 directory.
Afterdo
wnloading and saving DCOM95.EXE,do
the following:
NOTE: If you are setting up a Windows 98 DCOM Server, skip step 4.

Double-click DCOM95.EXE and proceed through the installation of DCOM95. This process requires you to reboot your system upon completion.
NOTE: If you intend to install DCM95CFG.EXE at the same time, you can forgo rebooting your computer until the completion of DCM95CFG.EXE installation.

Double-click DCM95CFG.EXE. This will install the DCOMCNFG.EXE utility that allows you to configure a DCOM server component. This requires you to reboot your system upon completion.

Change the key below in the Windows 95 registry:
HKEY_LOCAL_MACHINE/Software/Microsoft/OLE/EnableRemoteConnect
to the following:
Y
NOTE: Failure to set this key results in the following error on the client:
"Run-time error '429': ActiveX component can't create object"

Run DCOMCNFG on the Windows 95 or Windows 98 Server. Select the server component and click the "Properties" button. Select the "Location" tab and ensure that the "Run application on this computer" check box is selected.
Select the "Security" tab. Select either "Use default access Permissions" or "Use custom access permissions." If you opt to use custom permissions, click the Edit button.
Use the "Add Access Permissions" dialog box to grant or deny access to users of the server component. Click OK to close the "Add Access Permissions" dialog box. Click OK again to close the "Access Permissions" dialog box. then
click Apply to put your access permissions into effect. If youdo
not set custom access permissions, your server component will use the default access permissions for the computer. Default access permissions are set from the "Distributed COM Configuration Properties" dialog box. Select the tab labeled "Default Security" to set access permissions as described above.
NOTE: Failure to set the access permissions will result in the following error on the client:
"Run-time error '70': Permission denied"

NOTE: This step is not required with DCOM95 version 1.1 or later.
While it is not necessary to place a shortcut to RPCSS.EXE (found in your Windows/System folder) into your startup group, it is advisable because RPCSS.EXE needs to be running on the server before clients can connect.
NOTE: Failure to run RPCSS.EXE before attempting to connect to it will result in the following error on the client:
"Run-time error '-2147023174 (800706ba)': Automation error"
This error message decodes to "The RPC server is unavailable."

Place a shortcut to the server component you want to automate through DCOM into the startup group. Again, this is not necessary, but because the server component must be running before a client can access it, this is a good technique to ensure the component is always running.
NOTE: Failure to run the server component results in the following error on the client:
"Run-time error '429': ActiveX component can't create object"
 
以前回答的这类问题已经不少了,查查已答过的问题吧。实在懒得再写一遍了。
 
cmldy E 文可没人看。
确实在局域网内。dcom 是靠每台计算机不同的名字来寻找客户段的。
一台机子则是靠注册表。自要运行一边就在注册表中注册了。
 
如果 你是登陆的 NT 域 ,建议你将APP SERVER 放在主域控制器上.
如果 你是对等网 将APP SERVER 在两端 注册一下 就应该可以了.
:")
 
多人接受答案了。
 
顶部