Using a .NET-dll in VB6

R

Rudy

Hello,

I wrote a DLL in VB.NET and we need to use it inside a VB6-program. I was
unable to register the dll, but under Projekt|References, I can see the tlb
just fine. But when running the VB6-exe on any computer I get an error
message 'Run-time error 429'. ActiveX component can't create object. What
could I do to make them work together?
 
J

Josip Habjan

Rudy said:
Hello,

I wrote a DLL in VB.NET and we need to use it inside a VB6-program. I was
unable to register the dll, but under Projekt|References, I can see the tlb
just fine. But when running the VB6-exe on any computer I get an error
message 'Run-time error 429'. ActiveX component can't create object. What
could I do to make them work together?

You can't. ( there is no possibility )..

Regards,
Josip Habjan
 
A

Armin Zingler

Rudy said:
Hello,

I wrote a DLL in VB.NET and we need to use it inside a VB6-program. I
was unable to register the dll, but under Projekt|References, I can
see the tlb just fine. But when running the VB6-exe on any computer I
get an error message 'Run-time error 429'. ActiveX component can't
create object. What could I do to make them work together?

Did you deploy the .NET DLL and register it on the other machine
(regasm.exe)?
 
C

c-yellow

Hello,
: >
: > I wrote a DLL in VB.NET and we need to use it inside a VB6-program. I
was
: > unable to register the dll, but under Projekt|References, I can see the
: tlb
: > just fine. But when running the VB6-exe on any computer I get an error
: > message 'Run-time error 429'. ActiveX component can't create object.
What
: > could I do to make them work together?
: >
:
: You can't. ( there is no possibility )..
:
: Regards,
: Josip Habjan

i believe you are mistaken.
:
:
 
J

Josip Habjan

c-yellow said:
: >
: > I wrote a DLL in VB.NET and we need to use it inside a VB6-program. I
was
: > unable to register the dll, but under Projekt|References, I can see the
: tlb
: > just fine. But when running the VB6-exe on any computer I get an error
: > message 'Run-time error 429'. ActiveX component can't create object.
What
: > could I do to make them work together?
: >
:
: You can't. ( there is no possibility )..
:
: Regards,
: Josip Habjan

i believe you are mistaken.
:

maby :blush:)
 
A

Armin Zingler

Rudy said:
Now it's working. Thank you very much for the regasm-tip.

Was a pleasure. :)

More information:

<F1>
Visual Studio.NET
.NET Framework
Programming with .NET Framework
Interoperating with unmanaged code
Exposing .NET framework components to COM


ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB/dndotnet/html/callnetfrcom.htm

ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB/cpguide/html/cpconprimaryinteropas
semblies.htm

(see hints in signature)


--
Armin

- Links might be split into two lines. Concatenate them using notepad.
- Links might require to add a ".nnnn" after the "2003FEB", e.g.
"2003FEB.1033" for localized versions.
- Links starting with "ms-help" are URLs for the document explorer (<F1>).
Paste them in the URL textbox and press enter. Using internal help (menu
tools -> options -> environment -> help), display the "Web" toolbar that
contains the textbox.
- The tree representing the table of contents has been translated from
localized (German) version. Excuse slight deviations.
 
T

Tom Spink

Hi Rudy,

You may need to take a look at COM interop. .NET assemblies aren't
accessible through VB6, because they are managed code, and VB6 does not use
the managed framework. COM interop will let you expose your classes through
COM, and VB6 will let you use COM.

The reason you can't create the object is because you haven't exposed any
COM object.

However, may I ask why you wish to do this? Can you not convert your VB6
program to .NET?

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

" System.Reflection Master "

==== Converting to 2002 ====
Remove inline declarations
 
T

Tom Spink

Hi Josip,

Take a look at my post

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

" System.Reflection Master "

==== Converting to 2002 ====
Remove inline declarations
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top