Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Using a C# Class Library with VB6

Reply
 
Old 04-25-2008   #1 (permalink)
lord.torall


 
 

Using a C# Class Library with VB6

I hope I'm posting this in the right place....

I have a new C# class library written in Visual Studio 2008. I also
have an existing VB6 application that I have been maintaining for some
time.

In the configuration of the class library I have enabled "Make
assemble COM-Visible" and "Register for COM interop"

When I build the class library on my development machine I am able to
see and reference it from my VB6 application as I do many other dlls.
However, I am having a real headache when it comes to deploying my
application. I usualy build my MSI using InstallShield and have added
the dll and it's associated tlb to the package. However when I attempt
to run the released application on a test machine it fails with an
error 429. If I run the application in debug mode, if breaks the first
time it attempts to reference anything to do with my new class
library.

Can anyone give me some pointers as to what I should be doing in order
to run my application on anything other than my development machine?

My System SpecsSystem Spec
Old 04-25-2008   #2 (permalink)
Peter Ritchie [C# MVP]


 
 

RE: Using a C# Class Library with VB6

Have you registered the VB6 runtime and used regasm on the C# class library?
--
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#


"lord.torall@xxxxxx" wrote:
Quote:

> I hope I'm posting this in the right place....
>
> I have a new C# class library written in Visual Studio 2008. I also
> have an existing VB6 application that I have been maintaining for some
> time.
>
> In the configuration of the class library I have enabled "Make
> assemble COM-Visible" and "Register for COM interop"
>
> When I build the class library on my development machine I am able to
> see and reference it from my VB6 application as I do many other dlls.
> However, I am having a real headache when it comes to deploying my
> application. I usualy build my MSI using InstallShield and have added
> the dll and it's associated tlb to the package. However when I attempt
> to run the released application on a test machine it fails with an
> error 429. If I run the application in debug mode, if breaks the first
> time it attempts to reference anything to do with my new class
> library.
>
> Can anyone give me some pointers as to what I should be doing in order
> to run my application on anything other than my development machine?
>
My System SpecsSystem Spec
Old 04-26-2008   #3 (permalink)
Rob Windsor


 
 

Re: Using a C# Class Library with VB6

On Fri, 25 Apr 2008 07:18:47 -0700 (PDT), lord.torall@xxxxxx wrote:
Quote:

>I hope I'm posting this in the right place....
>
>I have a new C# class library written in Visual Studio 2008. I also
>have an existing VB6 application that I have been maintaining for some
>time.
>
>In the configuration of the class library I have enabled "Make
>assemble COM-Visible" and "Register for COM interop"
>
>When I build the class library on my development machine I am able to
>see and reference it from my VB6 application as I do many other dlls.
>However, I am having a real headache when it comes to deploying my
>application. I usualy build my MSI using InstallShield and have added
>the dll and it's associated tlb to the package. However when I attempt
>to run the released application on a test machine it fails with an
>error 429. If I run the application in debug mode, if breaks the first
>time it attempts to reference anything to do with my new class
>library.
>
>Can anyone give me some pointers as to what I should be doing in order
>to run my application on anything other than my development machine?
First off, you need to make sure to assign GUIDs correctly on your
class and on your interfaces. Then, you need to make sure to register
your assembly after you've deployed using regasm.exe.

This article should help

http://msdn2.microsoft.com/en-us/library/c3fd4a20.aspx

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Icons in dll / assembly / class library .NET General
Adding class library to website .NET General
Re: invisible classes outside the Class Library .NET General
RE: invisible classes outside the Class Library .NET General
Summary comments in Class Library .NET General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46