Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / October 2004

Tip: Looking for answers? Try searching our database.

CreateObject and .NET Framework v1.1 Service Pack 1

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Young, Corey - 12 Oct 2004 22:13 GMT
I am using Visual Studio .NET 2003 with .NET Framework v1.1 and Service Pack
1. I am using Windows XP with Service Pack 2.

I wrote a simple C# class and exposed it through COM interop. I then wrote a
simple VBScript to create an instance of this class using CreateObject and to
call a method on this instance. The method does something visible so that I
know it is being called.

When I execute cscript.exe from the command line, passing my .vbs file as
the only parameter, everything works fine. When I set the C# project
debugging properties to execute cscript.exe, correctly specifying the .vbs
file as the command line parameter, and then execute the C# project in debug
mode, execution of the script abrubtly stops upon calling CreateObject. I
don't get any errors, it just goes away (poof). I know that it goes away
because I placed a WScript.Echo statement before and after it. I also tried
using On Error Resume Next and checking the error code. Every time, execution
of the script abrubtly stops upon calling CreateObject. There are no errors,
no nothing.

Here is the interesting part. Prior to installing .NET Framework v1.1
Service Pack 1, this worked. After installing Service Pack 1, it does not
work. I tried this on a co-worker's machine that does not have Service Pack 1
installed and it works. So this appears to be a problem only with Service
Pack 1.

Does anyone know anything about this and how to get around this?

Signature

Corey Young
Software Engineer
LANDesk Software

Robert Simpson - 26 Oct 2004 23:13 GMT
I've had similar frustrations debugging .NET classes and programs being
called from a native mode executable.  As a matter of fact, I've crashed
VS.NET 2003 so many times doing mixed-mode debugging, I've abandoned the
effort.  I've been using VS2005 to debug lately, and it works like a champ.

Robert

> I am using Visual Studio .NET 2003 with .NET Framework v1.1 and Service Pack
> 1. I am using Windows XP with Service Pack 2.
[quoted text clipped - 22 lines]
>
> Does anyone know anything about this and how to get around this?

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.