473,387 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

"Catastrophic failure" / "Catastrophic error" accessing ActiveX Object

Hello,

i have a vb.net project with a reference to an ActiveX object (ocx).
If i try to use the ocx from vb6 project (adding the reference) it
works ok (using CreateObject).

In vb.net,

the CreateObject works ok, the object gets initialized...

but when i try to run an object method or change an object property
vb.net raises an InteropServices.COMException... "Catastrophic Error /
failure"...

The app type is console.

If i create a windows forms application and i add the ocx reference by
adding this one to the toolbar (personalize toolbar components)... it
runs ok using the name of the object dropped to the windows form.

But i can't use CreateObject for initialize the ocx object... and i
need to do this...

Any sugestions will be appreciated...

Thanks in advance,

Jorge.

Nov 23 '05 #1
2 8402
late binding in VB.Net requires some extra coding as in VB6 ( 2 lines extra
to be exact :-)

i do this wich works fine in my situation ( late binding to an VB6 Activex
executable )

Imports System.Reflection

Private HBSObject As Object
in my form load

Dim HBSCOM As Type

'Get the object

HBSCOM = Type.GetTypeFromProgID("Hbase.clsHbase")

'Create instance of HBSCOM

HBSObject = Activator.CreateInstance(HBSCOM)

in my cleanup routine

System.Runtime.InteropServices.Marshal.ReleaseComO bject(HBSObject)

HBSObject = Nothing

hth

let us now if this did the trick

Regards

Michel Posseth [MCP]




"jdanoz" <jo*********@gmail.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
Hello,

i have a vb.net project with a reference to an ActiveX object (ocx).
If i try to use the ocx from vb6 project (adding the reference) it
works ok (using CreateObject).

In vb.net,

the CreateObject works ok, the object gets initialized...

but when i try to run an object method or change an object property
vb.net raises an InteropServices.COMException... "Catastrophic Error /
failure"...

The app type is console.

If i create a windows forms application and i add the ocx reference by
adding this one to the toolbar (personalize toolbar components)... it
runs ok using the name of the object dropped to the windows form.

But i can't use CreateObject for initialize the ocx object... and i
need to do this...

Any sugestions will be appreciated...

Thanks in advance,

Jorge.

Nov 24 '05 #2

Hi Michel,

i tested your code but i get the same error "Catastrophic failure"....
Thanks,

Jorge.
m.posseth ha escrito:
late binding in VB.Net requires some extra coding as in VB6 ( 2 lines extra
to be exact :-)

i do this wich works fine in my situation ( late binding to an VB6 Activex
executable )

Imports System.Reflection

Private HBSObject As Object
in my form load

Dim HBSCOM As Type

'Get the object

HBSCOM = Type.GetTypeFromProgID("Hbase.clsHbase")

'Create instance of HBSCOM

HBSObject = Activator.CreateInstance(HBSCOM)

in my cleanup routine

System.Runtime.InteropServices.Marshal.ReleaseComO bject(HBSObject)

HBSObject = Nothing

hth

let us now if this did the trick

Regards

Michel Posseth [MCP]




"jdanoz" <jo*********@gmail.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
Hello,

i have a vb.net project with a reference to an ActiveX object (ocx).
If i try to use the ocx from vb6 project (adding the reference) it
works ok (using CreateObject).

In vb.net,

the CreateObject works ok, the object gets initialized...

but when i try to run an object method or change an object property
vb.net raises an InteropServices.COMException... "Catastrophic Error /
failure"...

The app type is console.

If i create a windows forms application and i add the ocx reference by
adding this one to the toolbar (personalize toolbar components)... it
runs ok using the name of the object dropped to the windows form.

But i can't use CreateObject for initialize the ocx object... and i
need to do this...

Any sugestions will be appreciated...

Thanks in advance,

Jorge.


Nov 25 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Yitzhak | last post by:
I am having "Permission denied" error while calling LogEvent method of WScript.Shell component. Basically, ASP page calls Windows Script Host Shell component to log events to the OS Application...
1
by: lauren quantrell | last post by:
Admitedly a very open-ended question but here goes ... Why so may "Connection failure" error messages when my Access 2K users are executing stored procedures that contain UPDATE or INSERT...
0
by: joef | last post by:
I'm running VS.net on my PC (W2K) connected to a remote IIS server (W2K) SP4 that is not a domain controller. I've got the ASPNET and IWAM accounts in the "Impersonate a client after...
3
by: HoustonComputerGuy | last post by:
I am working on getting my web applications moved to .Net 2.0 and am having some problems with System.Net.Mail. I get the following error when sending the mail: System.Net.Mail.SmtpException was...
2
by: Radu | last post by:
Hi. I have created a service which I needed to install. Therefore I use InstallUtil. On my dev machine at home I login as Administrator and I have *NO* password set. In my first attempts with...
8
by: MikeJ | last post by:
In my office, we have workstations with standard Win 2000 images (OS plus standard apps like Office, etc.) as developers, we then install our development tools on top of those images. other...
13
by: Kevin Liebowicz | last post by:
Yes, I wasted the past two days trying to fix this. Yes, this is on a Win2003 Server. Yes, this machine is a domain controller. Yes, I seen the dozens of KB articles like this one:...
5
by: Cirene | last post by:
I just deployed my new ASP.NET (3.5 FW) site to the hosting company I'm using, webhost4life. NOTE: I HAVE deployed other SQL Server sites to the same account with no issues. Now I'm getting...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.