Strange problem using External ActiveX - Idea to a solution?

Rexy

Member
Joined
Jan 16, 2007
Messages
14
Programming Experience
1-3
Im using this Direct Printer OCX
http://www.microtelecompos.com/ftp/StarVBKit.ocx

It works fine, when i start it in VB2005.
It also works when i publish the program and run it on the computer i build it on.

But when i try to install it on another computer it shows error

I zipped a published test program, so you can se the error..

I will be so happy, finding a sotution.. Becurse so i dont have to rewrite the whole program.
 

Attachments

  • test.zip
    235.2 KB · Views: 35
Here is the error message:

Class not registred.
Exception.InnerException
HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)
System.InvalidOperationException: There war an error creating the Form. See Exception.InnerException for detals. Error is: Class npt registred (HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) ---> System.Runtime.InteropServices.COMException (0x80040154): Class not registred (HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
ved System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
ved System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
ved System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
ved System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
ved System.Windows.Forms.AxHost.CreateInstance()
ved System.Windows.Forms.AxHost.GetOcxCreate()
ved System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
ved System.Windows.Forms.AxHost.CreateHandle()
ved System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
ved System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
ved System.Windows.Forms.AxHost.EndInit()
ved WindowsApplication1.Printer.InitializeComponent()
ved WindowsApplication1.Printer..ctor()
--- Slut på staksporing af indre undtagelser ---
ved WindowsApplication1.My.MyProject.MyForms.Create__Instance__[T](T Instance)
ved WindowsApplication1.Form1.Button1_Click(Object sender, EventArgs e)
ved System.Windows.Forms.Control.OnClick(EventArgs e)
ved System.Windows.Forms.Button.OnClick(EventArgs e)
ved System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
ved System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
ved System.Windows.Forms.Control.WndProc(Message& m)
ved System.Windows.Forms.ButtonBase.WndProc(Message& m)
ved System.Windows.Forms.Button.WndProc(Message& m)
ved System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
ved System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
ved System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Indlæste assemblies **************
mscorlib
Assemblyversion: 2.0.0.0
Win32-version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
WindowsApplication1
Assemblyversion: 1.0.0.0
Win32-version: 1.0.0.0
CodeBase: file:///C:/Documents and Settings/m...0000_c139b10a9316f18f/WindowsApplication1.exe
----------------------------------------
Microsoft.VisualBasic
Assemblyversion: 8.0.0.0
Win32-version: 8.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSI...0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assemblyversion: 2.0.0.0
Win32-version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assemblyversion: 2.0.0.0
Win32-version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSI....0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assemblyversion: 2.0.0.0
Win32-version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assemblyversion: 2.0.0.0
Win32-version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSI..._b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
AxInterop.StarVBKit
Assemblyversion: 4.3.0.0
Win32-version: 4.3.0.0
CodeBase: file:///C:/Documents and Settings/m...0000_c139b10a9316f18f/AxInterop.StarVBKit.DLL
----------------------------------------
System.Windows.Forms.resources
Assemblyversion: 2.0.0.0
Win32-version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSI...561934e089/System.Windows.Forms.resources.dll
----------------------------------------
mscorlib.resources
Assemblyversion: 2.0.0.0
Win32-version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Microsoft.VisualBasic.resources
Assemblyversion: 8.0.0.0
Win32-version: 8.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSI...f11d50a3a/Microsoft.VisualBasic.resources.dll
----------------------------------------
 
"Direct Printer OCX" isn't installed at target computer.
 
Yes thats make a difference...

I registred the "direct printer OCX" mauel with regsvr32. and i changes the error to this:

Error creating en formular.
No window-Handle for the object: AxStarComm (starvbkit.ocx)
ActiveX-Objects with no windows not possible.

Copi of details:

System.InvalidOperationException: Der opstod en fejl under oprettelsen af formularen. Se Exception.InnerException for at få yderligere oplysninger. Fejlen er: Der kunne ikke opnås en vindues-handle til objektet 'AxStarComm'. ActiveX-objekter uden vinduer understøttes ikke. ---> System.InvalidOperationException: Der kunne ikke opnås en vindues-handle til objektet 'AxStarComm'. ActiveX-objekter uden vinduer understøttes ikke.
ved System.Windows.Forms.AxHost.EnsureWindowPresent()
ved System.Windows.Forms.AxHost.InPlaceActivate()
ved System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
ved System.Windows.Forms.AxHost.CreateHandle()
ved System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
ved System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
ved System.Windows.Forms.AxHost.EndInit()
ved WindowsApplication1.Printer.InitializeComponent()
ved WindowsApplication1.Printer..ctor()
--- Slut på staksporing af indre undtagelser ---
ved WindowsApplication1.My.MyProject.MyForms.Create__Instance__[T](T Instance)
ved WindowsApplication1.Form1.Button1_Click(Object sender, EventArgs e)
ved System.Windows.Forms.Control.OnClick(EventArgs e)
ved System.Windows.Forms.Button.OnClick(EventArgs e)
ved System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
ved System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
ved System.Windows.Forms.Control.WndProc(Message& m)
ved System.Windows.Forms.ButtonBase.WndProc(Message& m)
ved System.Windows.Forms.Button.WndProc(Message& m)
ved System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
ved System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
ved System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Indlæste assemblies **************
mscorlib
Assemblyversion: 2.0.0.0
Win32-version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
WindowsApplication1
Assemblyversion: 1.0.0.0
Win32-version: 1.0.0.0
CodeBase: file:///C:/Documents and Settings/m...0000_c139b10a9316f18f/WindowsApplication1.exe
----------------------------------------
Microsoft.VisualBasic
Assemblyversion: 8.0.0.0
Win32-version: 8.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSI...0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assemblyversion: 2.0.0.0
Win32-version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assemblyversion: 2.0.0.0
Win32-version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSI....0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assemblyversion: 2.0.0.0
Win32-version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assemblyversion: 2.0.0.0
Win32-version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSI..._b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
AxInterop.StarVBKit
Assemblyversion: 4.3.0.0
Win32-version: 4.3.0.0
CodeBase: file:///C:/Documents and Settings/m...0000_c139b10a9316f18f/AxInterop.StarVBKit.DLL
----------------------------------------
System.Windows.Forms.resources
Assemblyversion: 2.0.0.0
Win32-version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSI...561934e089/System.Windows.Forms.resources.dll
----------------------------------------
Interop.StarVBKit
Assemblyversion: 4.3.0.0
Win32-version: 4.3.0.0
CodeBase: file:///C:/Documents and Settings/m...1.0000_c139b10a9316f18f/Interop.StarVBKit.DLL
----------------------------------------
mscorlib.resources
Assemblyversion: 2.0.0.0
Win32-version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Microsoft.VisualBasic.resources
Assemblyversion: 8.0.0.0
Win32-version: 8.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSI...f11d50a3a/Microsoft.VisualBasic.resources.dll
----------------------------------------
 
Still sounds as something is installed for this driver suite at development computer and not the other.
 
starvbkit.ocx

I Hope You are Still Working On your Program. I Know That This Is a Late Post to this topic but i have had the very same problem but I have Found the Fix to this bug when the MFG made starVbkit and put it out for download they failed to mention that you need to also include the files COMDLG32.OCX (Common Diolog) and MSCOMM32.OCX (Commport Lib) in your setup program
your development Pc All ready has these files this is why your program runs with no errors. the target pc must have these files installed as well I hope to Hear from You and Let me Kow If this Helped and if not maybe we can work on your bug if any after this to help get your program out.:D
 
Last edited:
Hi. I am having the same problem with the Star OCX. My setup already had the mscomm32.ocx, but not the comdlg32.ocx. I added it and tried again, but that did not work.

Any ideas?

Thanks in advance!
 
I was able to figure out using Filemon on a machine that was working that you also need MSWINSCK.OCX installed. Once I installed that (in addition to MSCOMM32.ocx), I was able to run my app with StarVBKit.ocx in it. Yay!
 
Back
Top