|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Debugging a COM Interop Class LibraryClassLibrary1 configured to run an external program (in this case C:\WINDOWS\system32\wscript.exe), in the Debugging Configuration Properties Dialog Box with command line arguments C:\test.vbs. When I run the project, I get an "unable to start debugging" error "unable to start program 'C:\WINDOWS\system32\wscript.exe'". Why do I get this error and how can I solve it? The Class Library is very simple Public Class Class1 Public Sub Test() Stop MsgBox("Test") End Sub End Class C:\test.vbs contains (if that matters): msgbox "Here" Set objApplication = Wscript.CreateObject("ClassLibrary1.Class1") objApplication.Test I selected the Build Configuration Properties Register for COM Interop checkbox, because wscript.exe is unmanaged code. I am running Windows XP Professional Service Pack 2. Greg,
Maybe you can add the process in the debugger. Be aware that it than has to run before you can attach it. Be as well aware that there probably is no source code availalable, so you only see the calls. Cor Show quoteHide quote "Greg" <G***@discussions.microsoft.com> schreef in bericht news:E9F6B258-CED0-473C-8B82-471AF31CE952@microsoft.com... >I have a very simple Visual Basic .NET 2003 class library project > ClassLibrary1 configured to run an external program (in this case > C:\WINDOWS\system32\wscript.exe), in the Debugging Configuration > Properties > Dialog Box with command line arguments C:\test.vbs. When I run the > project, I > get an "unable to start debugging" error "unable to start program > 'C:\WINDOWS\system32\wscript.exe'". > > Why do I get this error and how can I solve it? > > The Class Library is very simple > > Public Class Class1 > Public Sub Test() > Stop > MsgBox("Test") > End Sub > End Class > > C:\test.vbs contains (if that matters): > > msgbox "Here" > Set objApplication = Wscript.CreateObject("ClassLibrary1.Class1") > objApplication.Test > > I selected the Build Configuration Properties Register for COM Interop > checkbox, because wscript.exe is unmanaged code. > > I am running Windows XP Professional Service Pack 2. I have no idea what you just said.
Show quoteHide quote "Cor Ligthert [MVP]" wrote: > Greg, > > Maybe you can add the process in the debugger. Be aware that it than has to > run before you can attach it. Be as well aware that there probably is no > source code availalable, so you only see the calls. > > Cor > > "Greg" <G***@discussions.microsoft.com> schreef in bericht > news:E9F6B258-CED0-473C-8B82-471AF31CE952@microsoft.com... > >I have a very simple Visual Basic .NET 2003 class library project > > ClassLibrary1 configured to run an external program (in this case > > C:\WINDOWS\system32\wscript.exe), in the Debugging Configuration > > Properties > > Dialog Box with command line arguments C:\test.vbs. When I run the > > project, I > > get an "unable to start debugging" error "unable to start program > > 'C:\WINDOWS\system32\wscript.exe'". > > > > Why do I get this error and how can I solve it? > > > > The Class Library is very simple > > > > Public Class Class1 > > Public Sub Test() > > Stop > > MsgBox("Test") > > End Sub > > End Class > > > > C:\test.vbs contains (if that matters): > > > > msgbox "Here" > > Set objApplication = Wscript.CreateObject("ClassLibrary1.Class1") > > objApplication.Test > > > > I selected the Build Configuration Properties Register for COM Interop > > checkbox, because wscript.exe is unmanaged code. > > > > I am running Windows XP Professional Service Pack 2. > > > Greg,
Have a look in the debug button in top to "Attach to process" Cor Show quoteHide quote "Greg" <G***@discussions.microsoft.com> schreef in bericht news:169ED764-66DA-4F3B-85D7-0A44E2DE0C91@microsoft.com... >I have no idea what you just said. > > "Cor Ligthert [MVP]" wrote: > >> Greg, >> >> Maybe you can add the process in the debugger. Be aware that it than has >> to >> run before you can attach it. Be as well aware that there probably is no >> source code availalable, so you only see the calls. >> >> Cor >> >> "Greg" <G***@discussions.microsoft.com> schreef in bericht >> news:E9F6B258-CED0-473C-8B82-471AF31CE952@microsoft.com... >> >I have a very simple Visual Basic .NET 2003 class library project >> > ClassLibrary1 configured to run an external program (in this case >> > C:\WINDOWS\system32\wscript.exe), in the Debugging Configuration >> > Properties >> > Dialog Box with command line arguments C:\test.vbs. When I run the >> > project, I >> > get an "unable to start debugging" error "unable to start program >> > 'C:\WINDOWS\system32\wscript.exe'". >> > >> > Why do I get this error and how can I solve it? >> > >> > The Class Library is very simple >> > >> > Public Class Class1 >> > Public Sub Test() >> > Stop >> > MsgBox("Test") >> > End Sub >> > End Class >> > >> > C:\test.vbs contains (if that matters): >> > >> > msgbox "Here" >> > Set objApplication = Wscript.CreateObject("ClassLibrary1.Class1") >> > objApplication.Test >> > >> > I selected the Build Configuration Properties Register for COM Interop >> > checkbox, because wscript.exe is unmanaged code. >> > >> > I am running Windows XP Professional Service Pack 2. >> >> >> No, I'm not debugging a process. I'm debugging a Class Libbrary. A Windows
Script application just happens to create the class library object. Show quoteHide quote "Cor Ligthert [MVP]" wrote: > Greg, > > Have a look in the debug button in top to "Attach to process" > > Cor > > "Greg" <G***@discussions.microsoft.com> schreef in bericht > news:169ED764-66DA-4F3B-85D7-0A44E2DE0C91@microsoft.com... > >I have no idea what you just said. > > > > "Cor Ligthert [MVP]" wrote: > > > >> Greg, > >> > >> Maybe you can add the process in the debugger. Be aware that it than has > >> to > >> run before you can attach it. Be as well aware that there probably is no > >> source code availalable, so you only see the calls. > >> > >> Cor > >> > >> "Greg" <G***@discussions.microsoft.com> schreef in bericht > >> news:E9F6B258-CED0-473C-8B82-471AF31CE952@microsoft.com... > >> >I have a very simple Visual Basic .NET 2003 class library project > >> > ClassLibrary1 configured to run an external program (in this case > >> > C:\WINDOWS\system32\wscript.exe), in the Debugging Configuration > >> > Properties > >> > Dialog Box with command line arguments C:\test.vbs. When I run the > >> > project, I > >> > get an "unable to start debugging" error "unable to start program > >> > 'C:\WINDOWS\system32\wscript.exe'". > >> > > >> > Why do I get this error and how can I solve it? > >> > > >> > The Class Library is very simple > >> > > >> > Public Class Class1 > >> > Public Sub Test() > >> > Stop > >> > MsgBox("Test") > >> > End Sub > >> > End Class > >> > > >> > C:\test.vbs contains (if that matters): > >> > > >> > msgbox "Here" > >> > Set objApplication = Wscript.CreateObject("ClassLibrary1.Class1") > >> > objApplication.Test > >> > > >> > I selected the Build Configuration Properties Register for COM Interop > >> > checkbox, because wscript.exe is unmanaged code. > >> > > >> > I am running Windows XP Professional Service Pack 2. > >> > >> > >> > > >
IN Function ?
Recommendations - VB .Net courses/seminars How to identiy numerics in a string? another vb .net xml question "Four" to 4 PDF Creation components "Attempted to read or write protected memory" since 10 days... ADO.NET Rowfilter - between 2 dates How to deploye SQL 2005 Express with my application adding listbox selected items |
|||||||||||||||||||||||