Page 1 of 1

Image Display Control

PostPosted: Wed Dec 27, 2017 2:47 am
by icerany

I'm trying to upgrate custom WinForm project from ACE to

It shows a vision screen on my form. And it works fine with

I had copied all *.dll, *.ocx, ActiveV\* and HexSight\* from ACE\bin to solution output path.

After upgrated, I got an exception "Class Not Registered (0x80040154)" when creating image control.

Code: Select all
var imgCtrl = client.CreateObject(typeof(IImageDisplayControl)) as IImageDisplayControl;

Code: Select all
At System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
At System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
At System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
At System.Windows.Forms.AxHost.CreateInstance()
At System.Windows.Forms.AxHost.GetOcxCreate()
At System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
At System.Windows.Forms.AxHost.CreateHandle()
At System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
At System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
At System.Windows.Forms.AxHost.EndInit()
At Ace.HSVision.Client.ImageDisplay.ImageDisplayControl.InitializeComponent()
At Ace.HSVision.Client.ImageDisplay.ImageDisplayControl..ctor()

What steps did I miss??

By the way, I had try But it failed, too.

First, I must comment loading ActiveV and HexSight in *.manifest
If not, I will get an manifest error when starting to debug.

Comment *.manifest
ace_demo_manifiest.png (20.88 KiB) Viewed 1254 times

Second, it threw an exception that "visionGuiPlugin" is null.

Can not find VisionPlugin
ace_demo_error.png (64.24 KiB) Viewed 1254 times

How should I fix demo project ??

Re: Image Display Control

PostPosted: Wed Dec 27, 2017 7:10 pm
by icerany
I found a solution of create IImageDisplayControl failure....

using regsvr32 to register *.ocx and *.dll in ACE\bin\HexSight\Controls\

Code: Select all
@CD /D "C:\Program Files (x86)\Omron\ACE 3.7\bin\HexSight\Controls"
FOR %%f IN (*.ocx *.dll) DO REGESVR32 /S %%f

It is work for me.

But demo project still broken :(
Any tips ??