Types of ActiveX objectsThe DCOM (Distributed COM) allows you to access ActiveX objects on another computer
. ActiveX object is object that is created by Microsoft specification of the COM object.
Note: OPC server is also ActiveX object and the following text is valid for it as well as for other ActiveX objects.
ActiveX objects can hold the following forms:
1) the form of a DLL or OCX library and the object is created in the context of the calling process.
2) the form of an EXE program and the object creates its own new process (on the same computer).
3) the form of an EXE program and the object creates its own new process on the remote computer (by means of the DCOM).
Using DCOM in the PROMOTIC system
The installation of DCOM
doesn't relate to the PROMOTIC system, it's a matter of setting OS Windows
and the ActiveX object. Then the PROMOTIC system only uses such installed ActiveX object.
The DCOM can be used in the PROMOTIC system it thePmActiveX object (see Configuration of the DCOM interface for ActiveX) and in the PmOpcClient object (see Configuration of the DCOM interface for OPC server). In the configurator for object selecting it is possible to enter except the object name, the computer on which the object is created (see the configurator "Run on computer"). The computer can be specified by the computer name or the computer IP address.
Creating objects on other computer by means of the DCOM is suitable for the objects (programs) whose interface was designed and optimized for that purpose. The number of accesses to methods and properties of remote objects should be as low as possible. For example, if 100 values have to be get from the remote object, then all 100 values should be got by calling the sole method that returns all required values, for example, in an array. The interface of OPC components was optimized by this way.
Principle of remote access to common ActiveX objects by means of DCOM
By means of the DCOM
it is possible to use only ActiveX objects that are correctly registered so that they are shown in the OS Windows
configuration tool DCOMCNFG.EXE
. The object must be registered on both the server side (the computer on which the instance of the ActiveX object runs), and the client side (the PROMOTIC application that accesses the remote ActiveX object). In addition there must be enabled the creation of the ActiveX object by means of the DCOMCNFG.EXE
program on the server side from other computers, further there must be set the appropriate access rights to this object for clients and also the context of the Windows
user, in which the ActiveX object will be created. Without this configuration the ActiveX object cannot be created from another computer because the remote computer has no rights for this (like on sharing files it is necessary to enable sharing the appropriate folder and further to set the suitable access rights to shared files).
Configuration of remote access to ActiveX objects by means of DCOM
In order to configure the DCOM
it is necessary to have the OS Windows
administrator rights. The configuration of both DCOM
server and client is similar.
1) Server and client: If the computer of the server and the client is not in the domain, then it is necessary to create the user on the server with the same name and password as the user on the client computer (shared user).
2) Server and client: If the simplified file sharing in OS Windows XP is swithced on, then the "Access denied" error occures when trying to access the remote OPC server. Therefore it must be turned off. See Start > Control Panel > Folder properties > View > Detailed settings > Use simplified file sharing.
Server and client: Launch the console Start > Programs > Administrative Tools > Local Security Policy
. In the console go to Local Policies > Security Options
Check the following settings:
- Network access: Let Everyone permissions apply to anonymous users is enabled
- Network access: Sharing and security model for local accounts is set to Classic.
4) Server and client: Install ActiveX object (in the form of EXE).
5) Server and client: Launch the DCOMCNFG.EXE configuration tool (located in OS Windows subfolder system32), representing the DCOM administration console.
Server and client: In the console, go to Component Services > Computers > My Computer
and display the Properties
(right mouseclick). Here you can manage the configuration of the common parts of COM
and default values for each COM
On the Default Properties
page, check the settings:
- Enable Distributed COM on this computer is enabled
- Default Authentication Level is set to None
- Default Impersonation Level is set to Identify.
On the COM Security
page check the settings:
- In Access Permissions > Edit Limits for Everyone the Local Access and the Remote Access are both enabled
- In Access Permissions > Edit Default for the common user (same for client and server) the Local Access and Remote Access are both enabled
- In Launch and Activation Permissions > Edit Limits for Everyone the Local Launch, Remote Launch, Local Activation and Remote Activation are all enabled
- In Launch and Activation Permissions > Edit Default for the common user (same for client and server) the Local Launch, Remote Launch, Local Activation and Remote Activation are all enabled
Server and client: Configuration of the ActiveX
object. In the console go to Component services
> My computer
> DCOM Config
and display the Properties (right mouseclick).
a) On the General page check if the setting of Authentication Level is set to None.
b) On the Location page check the setting Run application on this computer.
c) On the Security page check if all options are set to Use Default. The options are Launch and Activation Permissions, Access Permissions and Configuration Permissions.
d) On the Identity page check whether the Interactive user is set. It is also possible to configure the login details for specific common user, that allows independent access from the client computer regardless of the Windows user that is currently logged in/out on the server.
The setup of messages for PROMOTIC depends on the location of the PROMOTIC software on the disc. If the PROMOTIC software is moved to another location or another version is registered by PmReg.bat
, then the the DCOM
stops working (the other functions of the PROMOTIC system may continue to work correctly). If there are multiple PROMOTIC versions on the disc and the user needs to switch between these versions then (from the DCOM configuration point of view) it is recommended to have the active version of the PROMOTIC always in the same folder (e.g. c:\\pm).