Hi
I assume you are call .NET exposed COM object from vb6.
I think you may try to follow the steps below debuging vb6 app in vs.net.
1. Compiled the VB6 with Create Symbols
2. Set the Startup program when debugging for the VB.NET dll with the VB6
project1.EXE and check the unmanaged debugging option in the project
setting.
3. Open the Form1.frm in the vb.net IDE
4. Set break point in the Form1.frm's code line
5. F5 to run the VB.NET DLL project, because we have set the VB6
project1.EXE as the start up program, it will be run to hit the break point
in the Form1.frm
e.g.
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 495
Left = 1800
TabIndex = 0
Top = 1320
Width = 1215
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim o As New TestCrossDebugVB6.MyTestClass
Dim s As String
s = o.TestString() 'If we set break point here, it will be hit when we
click Command1
MsgBox s
End Sub
[VB,NET]
Imports System.Runtime.InteropServices
<ClassInterface(ClassInterfaceType.AutoDual)> _
Public Class MyTestClass
Public Function TestString() As String
Return "Hello World"
End Function
End Class
You may have a try.
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.