473,394 Members | 1,770 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,394 software developers and data experts.

COM doesn't work in VB.net


I have created several COM objects (inside one DLL) which works fine in
JScript and VBScript (when called using cscript). It also works fine when
called from Visual C++ 6, Delphi 7 and FoxPro 6.

It doesn't work when called from VB.Net 2003. :( The error is:

An unhandled exception of type 'System.Runtime.InteropServices.COMException'
occurred in Test.exe
Additional information: COM object with CLSID {12345678-...-123456789012} is
either not valid or not registered.

Other COM objects from the same DLL works fine, but only this object
fail during initialisation:

Dim myApp As New MYAPPCOMLib.MyClass

What should I do?

Nov 21 '05 #1
6 1430
Hi,

Did you try installing service pack 1 for the dot net framework 1.1?

http://support.microsoft.com/default...b;en-us;885055

Ken
------------------------------

"Petar Popara" wrote:

I have created several COM objects (inside one DLL) which works fine in
JScript and VBScript (when called using cscript). It also works fine when
called from Visual C++ 6, Delphi 7 and FoxPro 6.

It doesn't work when called from VB.Net 2003. :( The error is:

An unhandled exception of type 'System.Runtime.InteropServices.COMException'
occurred in Test.exe
Additional information: COM object with CLSID {12345678-...-123456789012} is
either not valid or not registered.

Other COM objects from the same DLL works fine, but only this object
fail during initialisation:

Dim myApp As New MYAPPCOMLib.MyClass

What should I do?

Nov 21 '05 #2

Have tried it, but it doesn't help. :(
Nov 21 '05 #3
Hi Petar, this isn't my speciality, but I tried a few walkthroughs and have
sucessfully done this. The step that I think is missing is exporting the
type library that allows .Net managed code to inter-operate with non-managed
dll's

This is taken from MSDN:
This example shows you how to create an AVI viewer using TlbImp. The program
reads an AVI filename from the command line, creates an instance of the
Quartz COM object, then uses the methods RenderFile and Run to display the
AVI file.

These are the steps to build the program:

a.. Run TlbImp over the TLB. The Media Player used in this example is
contained in Quartz.dll, which should be in your Windows system directory.
Use the following command to create the .NET Framework DLL:
tlbimp c:\winnt\system32\quartz.dll /out:QuartzTypeLib.dll

"Petar Popara" <my*****@mail.net> wrote in message
news:el**************@tk2msftngp13.phx.gbl...

I have created several COM objects (inside one DLL) which works fine
in
JScript and VBScript (when called using cscript). It also works fine when
called from Visual C++ 6, Delphi 7 and FoxPro 6.

It doesn't work when called from VB.Net 2003. :( The error is:

An unhandled exception of type
'System.Runtime.InteropServices.COMException'
occurred in Test.exe
Additional information: COM object with CLSID {12345678-...-123456789012}
is
either not valid or not registered.

Other COM objects from the same DLL works fine, but only this object
fail during initialisation:

Dim myApp As New MYAPPCOMLib.MyClass

What should I do?

Nov 21 '05 #4

Thank you very much for this tip.

Please, could you show me what should I do with new (type lib) DLL? How can
I include it in my project and use it?

I'm not expirienced with .Net. :(
Nov 21 '05 #5
Use the following command to create the .NET Framework DLL:
tlbimp c:\winnt\system32\quartz.dll /out:QuartzTypeLib.dll


Have tried that and still doesn't work. :(
Nov 21 '05 #6
Once you have the new dll, copy it and the tlb to your bin directory (just
to keep it separate from the original). Then your project references the new
one, not the original.

"Petar Popara" <my*****@mail.net> wrote in message
news:Ov**************@TK2MSFTNGP14.phx.gbl...

Thank you very much for this tip.

Please, could you show me what should I do with new (type lib) DLL? How
can I include it in my project and use it?

I'm not expirienced with .Net. :(

Nov 21 '05 #7

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

Similar topics

7
by: AnnMarie | last post by:
My JavaScript Form Validation doesn't work at all in Netscape, but it works fine in IE. I made some of the suggested changes which enabled it to work in IE. I couldn't make all the changes...
39
by: Mark Johnson | last post by:
It doesn't seem possible. But would the following also seem a violation of the general notions behind css? You have a DIV, say asociated with class, 'topdiv'. Inside of that you have an anchor...
3
by: Matt | last post by:
I want to know if readOnly attribute doesn't work for drop down list? If I try disabled attribute, it works fine for drop down list. When I try text box, it works fine for both disabled and...
149
by: Christopher Benson-Manica | last post by:
(Followups set to comp.std.c. Apologies if the crosspost is unwelcome.) strchr() is to strrchr() as strstr() is to strrstr(), but strrstr() isn't part of the standard. Why not? --...
6
by: A.M-SG | last post by:
Hi, I have an aspx page at the web server that provides PDF documents for smart client applications. Here is the code in aspx page that defines content type: Response.ContentType =...
4
by: bbp | last post by:
Hello, In an ASPX page I have a "Quit" button which make a simple redirect in code-behind. This button doesn't work no more since (I think) I moved from the framework 1.0 to 1.1 and it doesn't...
3
by: Dave Moore | last post by:
Hi All, Ok, here's my problem. I want to open a file and process its contents. However, because it is possible that the file may not exist, I also want to check whether the file() function is...
10
by: Sourcerer | last post by:
I wrote this very simple code in .NET VC++. I compiled it on my system, and tried to run it on my friend's computer (he doesn't have the compiler). We both have Windows XP Professional. I have .NET...
6
by: Johnny Jörgensen | last post by:
I've got a usercontrol derived from a normal ComboBox that contains some special formatting code. On my main form I've got a lot of my custom comboboxes. I discovered a bug in the derived...
39
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.