IBM Support

IBM Personal Communications ActiveX controls



This document explains how ActiveX controls can set up in IBM Personal Communications



The Support of ActiveX/OLE in IBM Personal Communications (PCOMM) is limited and has minimal support for Office/Lotus tools, which can be used further in automating the operations within PCOMM. However, PCOMM does not provide a way to embed itself as a full-fledged ActiveX object, or having it instantiated as a Form Object.

While PCOMM provides the API interface (HACL Automation / COM objects) for .NET Framework targeted applications (such as the WinForms application), the ActiveX/OLE support provided by PCOMM is primitive. There is no API interface to embed PCOMM Runtime.

What has changed with IBM Personal Communications v13.0.1.0?

PCOMM packages pcsctrX.ocx – an ActiveX Control which can be hosted in an OLE container. An OLE container control lets you add an OLE objects to your applications. OLE objects include ActiveX Controls (.OCX files) and insert-able OLE objects created in other applications such as Microsoft Word and Microsoft Excel.

After adding pcsctrX.ocx into an OLE container or an Automation Client, users can start a PCOMM session in the ActiveX control by providing Session ID (optional) and the PCOMM Workstation profile (mandatory). Once started, PCOMM session will be embedded in the application.

This control supports:

  • ActiveX Control for PCOMM achieves all the features of Statically and Dynamically Embedding PCOMM as an ActiveX control object in a windows Form (or .NET application).
  • Users can launch PCOMM by providing two important parameters:

  • Session ID (Optional):
    • When set: This can be set from ‘A’ to ‘Z’.
    • Blank: The Control logic generates the SessionID and Launches the PCOMM with next available Session ID.
    • Already existing/launched: Provides an option to the user to embed the same session in the ActiveX control.
    Session Profile (mandatory): User must provide a valid .ws profile name, else the launch of Embedded PCOMM will fail.
    • Session Profile name may or may not have a ‘.ws’ extension.
    • If path is not provided, then the default path is picked up from the registry.
    • With Customized path, PCOMM is launched with the .ws file from customized path.
  • Automation/Screen Scraping: Operations based on automation objects (HACL) and Emulator Programming (ELLAHPI) are supported.
  • Menu and Toolbar Items in the Embedded PCOMM (pcsctrX) are hidden.
  • Errors/Exceptions are handled.

System Requirements
1. Visual Studio 2005 or higher: To build a client application using pcsctrX.ocx.
2. Microsoft Office (32 bit): If client application executes on a Microsoft Office application.
3. IBM Personal Communication Ver or higher.

Register pcsctrX.ocx on a system where users need to execute the OLE/Automation Container Application built with pcsctrX.ocx.

To register, execute below command in command window with elevated permission:
regsvr32 pcsctrX.ocx

To unregister, execute below command in command window with elevated permission:
regsvr32 /u pcsctrX.ocx


CHAR pcsOcxStartSession (CHAR sessID, BSTR wsProfile)
Starts PCOMM session in the ActiveX Control window by using a specified workstation profile and A (optional) short session ID can also be specified.

• sessID: Presentation space short session ID. It is optional and if not provided then next available session ID is assigned.
• wsProfile: Path and complete filename of the profile to load. Path is optional but complete filename is mandatory.
• Return Value
    o Returns the Presentation space short session ID.
    o If sessID was provided, then same value is returned else new assigned session Id is returned.
    o If PCOMM session failed to start, then a blank/NULL value is returned.

VARIANT_BOOL pcsOcxConnectSession(void)
Connect the PCOMM emulator to the host data stream. This has the same effect as going to the PCOMM emulator Communication menu and choosing Connect.

  • Return Value
    • Returns true if connected successfully else false.

VARIANT_BOOL pcsOcxDisconnectSession(void)
Disconnect the PCOMM emulator to the host data stream. This has the same effect as going to the PCOMM emulator Communication menu and choosing Disconnect.

  • Return Value
    • Returns true if disconnected successfully else false.


PCOMM Window Recognition
pcsctrX.ocx recognizes PCOMM window based on its name, “Session ID *“.
for e.g. Session A – [24 x 80].
If this naming standard is not followed (by changing Edit->Preferences->Display Setup configurations), then the PCOMM session will be failed to appear in ActiveX control screen.

Redundant Disconnect context item
Disconnect context Menu item which appears in a static invoke method on the pcsctrX ActiveX control is redundant. This limitation would be taken care in the upcoming release.

Menu and Toolbar state conflict
If PCOMM Session profile is same as the one specified in the Embedded ActiveX control, then PCOMM shall be Embedded in the ActiveX control without any change in state, however, the Menu and the Toolbar items are visible. This limitation would be taken care in the upcoming release.

Known Issues
To receive notification of all OIA events in a pcsctrX.ocx container application, used IBM PCOMM method ‘RegisterOIAEvent‘, but the container application fails to receive event notification from autOIA.

It is a defect in the automation API ‘RegisterOIAEvent’.

Resolving The Problem

[{"Product":{"code":"SSEQ5Y","label":"Personal Communications"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":"Documentation","Platform":[{"code":"PF033","label":"Windows"}],"Version":"12.0.3;13.0.0","Edition":"","Line of Business":{"code":"LOB17","label":"Mainframe TPS"}}]

Document Information

Modified date:
03 February 2020