473,796 Members | 2,677 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# and VB6 Debugging

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: AssemblyDelaySi gn(false)]
[assembly: AssemblyKeyFile ("")]
[assembly: AssemblyKeyName ("")]
[assembly: ClassInterface( ClassInterfaceT ype.AutoDual)]
[assembly: ComVisible(true )]

[VB6 Program]

Private Sub Command1_Click( )
Dim a As UsmanCSharp.Cla ss1

Set a = New UsmanCSharp.Cla ss1

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

Feb 27 '06 #1
1 2204
This article might be of help.

http://www.vbrad.com/article.aspx?id=46
Usman wrote:
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: AssemblyDelaySi gn(false)]
[assembly: AssemblyKeyFile ("")]
[assembly: AssemblyKeyName ("")]
[assembly: ClassInterface( ClassInterfaceT ype.AutoDual)]
[assembly: ComVisible(true )]

[VB6 Program]

Private Sub Command1_Click( )
Dim a As UsmanCSharp.Cla ss1

Set a = New UsmanCSharp.Cla ss1

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

Feb 28 '06 #2

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

Similar topics

0
3232
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs converted/developed with VB.NET. What I want from debugging is to be able to step into the methods in the DLLs called from ASP scripts using Visual Studio .NET. Background: For typical script debugging issues, you can read and follow the two documents on...
16
4227
by: Serdar Kalaycý | last post by:
Hi everybody, My problem seems a bit clichè but I could not work around. Well I read lots of MSDN papers and discussions, but my problem is a bit different from them. When I tried to run the project in debug mode (by hitting F5) it gives an error message "Error while trying to run project: Unable to start debugging on the web server.
2
1853
by: Andy Fish | last post by:
Hi, Using VS.NET 2003, when I use 'F5' to start debugging my web app, it obviously attaches the IDE to IIS for server debugging. However, it also seems to put IE into some kind of debugging mode (for javascript debugging) This causes IE to consume loads of CPU if the page is very large. Is there any way to have debugging of server side code but leave IE in "normal" mode?
2
3277
by: Alex Clark | last post by:
Hi All, My system: WinXP Pro, VS.NET 2003, SQL Server Personal Edition. I'm having problems with my old favourite demon, SQL Debugging from within VS.NET. I have to say I've found this particular feature to be one of the most useful and (sadly) unreliable/fragile features in VS.NET, it seems the slightest thing will break it.
5
2958
by: Velvet | last post by:
Can someone tell me to what process I need to attach to be able to step through my classic ASP code in VS.net 2003. I'm working on an XP box with IIS installed. I also have VS.net 2005 (The final, never installed beta) installed on this box if it makes a difference (I did not install VS Development Web Server as I'm already using the XP web server). I've seen that I need to attach to the native IIS engine, but I don't know what it's...
6
2509
by: KevinGPO | last post by:
I am currently developing a website in ASP (VBScript) using MS Visual C#.NET IDE. I just create a new "ASP.NET Web Application" and point to my local webserver (IIS) of my website address. Then I just go through each file/folder and right-click, selecting "Include in project". The IDE is nice in that it checks, verifies id tags, etc. What am wondering is whether it's possible to debug my ASP website using the MS Visual Studio.NET's...
5
7802
by: phnimx | last post by:
Hi , We have developed a number of plug-in .NET Library Components that we typically deploy with our various applications by installing them into the GAC. Each of the applications contains an app.config file referencing arbitrary versions of the plug-in components they wish to consume. Here's the problem: Assuming I have installed any one of our application software,
5
3452
by: =?Utf-8?B?Z2FkeWE=?= | last post by:
I can't get to debug on my local IIS using VStudio.net 2005 Prof. I can on the development server. I get the msg 'the server does not support debugging for asp.net...' I have done the following as in 'How to: Enable Debugging for ASP.NET Applications' Under Debuggers ASP.NET box is selected in web.config set compilation debug="true" in virtual directory:
2
20855
jwwicks
by: jwwicks | last post by:
C/C++ Programs and Debugging in Linux This tutorial will give you a basic idea how to debug a program in Linux using GDB. As you are aware Visual Studio doesn’t run on Linux so you have to use some of the tools provided on the command-line. If you hate the command line tools, get over it since you’re bound to be using them at some point in your career. All commands in Linux ARE case sensitive so capital letters are different from lowercase...
4
12697
by: =?Utf-8?B?TWlrZSBHYWxl?= | last post by:
VS 2008 initially didn't debug classic ASP. SP1 fixes this in some ways. You can debug if you select the debug option to "Start Without Debugging, then either attach the debugger manually or place a stop directive in the code which ends up doing the same thing. The problem with this is that you can't debug browser side Javascript in the same debug run. You get a "The breakpoint will not currently be hit. The document is not loaded." if...
0
9684
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10459
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10236
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10017
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7552
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6793
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5445
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.