Resolving 'Register OCX Button Does Not Show Library' in WinCC Graphics Designer

Resolving 'Register OCX Button Does Not Show Library' in WinCC Graphics Designer

When clicking the 'Register OCX...' button under 'Select OCX Controls' in SIMATIC WinCC Graphics Designer and the file selection dialog fails to open or does not display the expected ActiveX control libraries, the issue is caused by missing Windows administrative execution rights, 32-bit vs 64-bit subsystem path redirection, or disabled User Account Control (UAC) file virtualization. In SIMATIC WinCC, Graphics Designer (PdlEditor.exe) is a 32-bit application that requires elevated privileges to query system COM registries and browse C:\Windows\SysWOW64\. To resolve this, run Graphics Designer as Administrator, register third-party OCX controls manually using 32-bit regsvr32.exe, and ensure target controls are 32-bit COM libraries.

Table of Contents

ActiveX (OCX) Architecture in SIMATIC WinCC Graphics Designer

In SIMATIC WinCC (such as V7.0, V7.3, V7.4, and V7.5 within PCS 7), the Graphics Designer provides an extensible container allowing engineers to embed custom ActiveX controls (OLE Control Extensions, .ocx) directly into process pictures. Examples include third-party charting libraries, camera video feeds, specialized barcode scanners, or custom instrumentation meters.

To make an OCX control available in the Graphics Designer object palette, an engineer opens Select OCX Controls in the controls tab and clicks Register OCX... to browse for the .ocx file and write its GUID into the Windows registry.

Root Causes of 'Register OCX' Dialog Failures in 64-Bit Windows

On modern 64-bit operating systems (Windows 7 64-bit, Windows 10 Enterprise LTSB, Windows Server 2016), engineers frequently observe that clicking Register OCX... does nothing, throws a silent error, or opens an empty directory browser:

  1. Insufficient Administrative Privileges: Writing to HKEY_CLASSES_ROOT and registering COM objects requires elevated administrator rights. If WinCC Explorer or Graphics Designer was launched under standard user tokens, Windows silently suppresses the registration file dialog.
  2. 32-Bit vs 64-Bit Mismatch: WinCC Graphics Designer (PdlEditor.exe) and Graphics Runtime (PdlRuntime.exe) are 32-bit applications. They can only load and execute 32-bit ActiveX controls. Attempting to register a 64-bit OCX will fail because 32-bit processes cannot load 64-bit binaries.
  3. WOW64 File Redirection: On 64-bit Windows, 32-bit system libraries reside in C:\Windows\SysWOW64\, while 64-bit libraries reside in C:\Windows\System32\. Navigating to System32 in the browser masks 32-bit OCX files.

Comparison of 32-Bit vs 64-Bit ActiveX Execution Environments

The following table compares ActiveX compatibility constraints in SIMATIC WinCC:

Architecture Parameter32-Bit ActiveX Control (Supported)64-Bit ActiveX Control (Unsupported)Binary Architecturex86 (32-bit PE format)x64 (64-bit PE format)Physical Storage LocationC:\Windows\SysWOW64\ or WinCC\bin\C:\Windows\System32\Registration ToolC:\Windows\SysWOW64\regsvr32.exeC:\Windows\System32\regsvr32.exeCompatibility with WinCC100% Fully CompatibleIncompatible; rejected by WinCCGraphics Designer VisibilityAppears in Object PaletteCannot be registered or displayedExecution StabilityHigh; isolated memory spaceCauses GPF crash if forced into 32-bit process

Step-by-Step Procedure to Register and Integrate OCX Controls

Follow this procedure to successfully register and display OCX controls in WinCC Graphics Designer:

  1. Verify 32-Bit Compatibility of Target OCX:
    - Confirm that the vendor provides a 32-bit (x86) version of the .ocx control.
    - Copy the .ocx file to the standardized 32-bit system folder:
    C:\Windows\SysWOW64\ or into your WinCC project directory <Project>\GraCS\.

  2. Register the Control via Elevated Command Prompt:
    - Open Windows Start Menu, type cmd, right-click and select Run as administrator.
    - Execute the 32-bit registration command:
    cmd C:\Windows\SysWOW64\regsvr32.exe C:\Windows\SysWOW64\MyControl.ocx
    - Confirm the success popup: DllRegisterServer in MyControl.ocx succeeded.

  3. Launch Graphics Designer with Administrative Rights:
    - Close Graphics Designer.
    - In WinCC Explorer, right-click Graphics Designer and launch with administrative credentials.

  4. Select and Display the OCX in Graphics Designer Palette:
    - Open any picture (.pdl).
    - In the right-hand Object Palette, expand the Controls tab.
    - Click the gear icon or right-click in the palette and select Select OCX Controls....
    - In the list of installed system COM objects, locate your registered control (it will now appear in the list with a checkbox).
    - Check the box and click OK.
    - The control icon immediately appears in the palette ready for drag-and-drop placement.

Verification

Verify OCX control functionality in Graphics Designer:
1. In the Graphics Designer Controls palette, select your newly registered OCX control.
2. Drag and drop the control onto an open .pdl canvas. Confirm that the control instantiates cleanly without throwing an OLE creation error.
3. Right-click the placed object and select Properties. Verify that the control's proprietary property pages and events populate.
4. Save the picture and launch WinCC Runtime. Confirm that the ActiveX control renders and interacts with operator clicks in runtime.

Limitations and Operational Precautions

  1. Never Deploy Unvetted Third-Party OCXs in Production: Defective third-party ActiveX controls can leak Windows GDI handles or dereference NULL pointers, causing PdlRuntime.exe to crash with a General Protection Fault (GPF). Always test in a staging environment.
  2. Web Navigator Incompatibility: Client-side ActiveX controls placed in WinCC pictures are not automatically downloaded to Web Navigator thin clients unless packaged into a digitally signed cabinet file (.cab) and referenced in the Web Navigator server configuration.
  3. Operating System Upgrades: Major Windows updates (e.g. migrating Windows 7 to Windows 10 LTSB) can deregister third-party COM DLLs. Keep an automated registration batch script for disaster recovery.

Engineer FAQ

Why did the 'Register OCX' button do nothing when clicked?

Graphics Designer lacked Windows administrative permissions to access the file dialog or write to the system registry. Running Graphics Designer as Administrator resolves the prompt.

Can I use 64-bit OCX controls in WinCC V7.4 / PCS 7 V9.0?

No. WinCC Graphics Designer and Graphics Runtime are 32-bit applications and cannot load 64-bit ActiveX controls. All embedded OCX controls must be 32-bit binaries.

Where should I place custom OCX files before registering them?

The best locations are C:\Windows\SysWOW64\ for system-wide controls or inside the WinCC project's GraCS directory for project-specific controls.

Technical References

Related Articles

Related Tags

  • ActiveX OCX
  • Graphics Designer
  • Register OCX
  • regsvr32
  • SysWOW64
  • WinCC Controls
6 respuestas