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 / Visual Studio.NET / IDE / October 2004

Tip: Looking for answers? Try searching our database.

Creating a DTE object

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dan - 21 Oct 2004 20:09 GMT
Hi All -
Does anyone know of a way to create a DTE object programmatically without
launching devenv.exe? I'm trying to do some remote-controlling of the IDE,
but the cross-process reference to a DTE object created with the following
code results in painfully slow performance whenver the oDTE is referenced.

oDTE =
CType(System.Activator.CreateInstance(System.Type.GetTypeFromProgID("VisualS
tudio.DTE.7.1"), True), EnvDTE.DTE)

Any ideas?

TIA -
Dan
Carlos J. Quintero [MVP] - 22 Oct 2004 12:34 GMT
I don?t think there is another way apart from calling CreateInstance with
"VisualStudio.DTE.7.1" as you are doing, but I think it should not be so
slow, what kind of operations are you trying to do?

Signature

Carlos J. Quintero (Visual Developer - .NET MVP)

The MZ-Tools all-in-one add-in, now for .NET: http://www.mztools.com

> Hi All -
> Does anyone know of a way to create a DTE object programmatically without
[quoted text clipped - 3 lines]
>
> oDTE =

CType(System.Activator.CreateInstance(System.Type.GetTypeFromProgID("VisualS
> tudio.DTE.7.1"), True), EnvDTE.DTE)
>
> Any ideas?
>
> TIA -
> Dan
Dan - 22 Oct 2004 14:05 GMT
The operations span pretty much the entire EnvDTE namespace, including
extensive use of CodeElements and EditPoints. Each individual reference to
the DTE object isn't slow, but I'm doing hundreds of thousands (perhaps
millions) of them. An operation that takes 2 minutes when run from an addin
takes an hour when run through automation (cross process reference). The
not-in-process thing is all I can think of that would be destroying the
performance.

Dan

> I don?t think there is another way apart from calling CreateInstance with
> "VisualStudio.DTE.7.1" as you are doing, but I think it should not be so
[quoted text clipped - 7 lines]
> >
> > oDTE =

CType(System.Activator.CreateInstance(System.Type.GetTypeFromProgID("VisualS
> > tudio.DTE.7.1"), True), EnvDTE.DTE)
> >
> > Any ideas?
> >
> > TIA -
> > Dan

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.