VB6 and VS.NET debugging
- From: "Usman" <khanusman@xxxxxxxxx>
- Date: 27 Feb 2006 06:25:41 -0800
Hi,
I have a simple visual basic 6 program that calls a function in a class
written in C# assembly. Running executeable directly gives me no
problem, debugging VB6 program is also working fine. However, when I
try to debug C# assembly with VB6 program, VB6 program simply crashes
upon trying to create C# class object. I am attaching the VB6 and C#
sources for reference,
[C#]
using System;
using System.Windows.Forms;
namespace UsmanCSharp
{
/// <summary>
/// Summary description for Class1.
/// </summary>
public class Class1
{
public Class1()
{
//
// TODO: Add constructor logic here
//
}
public void ShowMessage()
{
MessageBox.Show("Hello");
}
}
}
AssemblyInfo.cs ====>
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]
[assembly: ClassInterface(ClassInterfaceType.AutoDual)]
[assembly: ComVisible(true)]
[VB6 Program]
Private Sub Command1_Click()
Dim a As UsmanCSharp.Class1
Set a = New UsmanCSharp.Class1
a.ShowMessage
End Sub
I have a machine running WinXP SP2 with VS.NET 2003(.NET Framework
v1.1.4322 and v 2.0.50727) and Microsft Visual Studio 6.0 (SP6)
installed. I registered C# assembly by RegAsm using following command,
regasm /tlb /codebase UsmanCSharp.dll
I had everything working fine till I got this new machine and debugging
in VS.NET stopped working. Any ideas what might be going on?
Thanks,
Usman
.
- Prev by Date: Re: What is the status of VB6 & DOT.NET ?
- Next by Date: Re: visual basic program to manipulate text
- Previous by thread: Checking if a file exists
- Next by thread: How to efficiently allocate space for a variable length string in VB6?
- Index(es):
Relevant Pages
|