Article ID: 192912 - View products that this article applies to.
This article was previously published under Q192912
This article has been archived. It is offered "as is" and will no longer be updated.
After a Component Object Model (COM) client has loaded MSDev.exe using the COM automation interface, MSDev.exe does not automatically close when its last reference is released.
Use Application.Quit method of MSDev.exe to cause it to remove itself from memory just before releasing the last reference to it. See the MORE INFORMATION section of this article for sample Visual C++ and Visual Basic code.
MSDev.exe is the Developer Studio shell. In Visual Studio 97 it hosts Visual C++, Visual InterDev, Visual J++, and the InfoViewer. In Visual Studio 6.0, it only hosts Visual C++. It supports an automation interface that exposes its object model. An external application using the object model can access internal functions to automate tasks such as building projects, changing their settings, modifying text files, and so on.
The automation interface is based on COM technology. Most COM automation objects count the number of COM clients referencing them, and automatically terminate themselves when the reference count goes to zero. One example is Microsoft Word, which starts when a COM client creates a Word.Document object, and terminates when the last reference to that object is released.
In Visual C++, the following code illustrates proper automation of MSDev.exe:
This Visual Basic code illustrates the use of the Quit method:
For additional information, please see the following article in the Microsoft Knowledge Base:
192913For more information on Automation and the Developer Studio object model, please see the following Help topics:
(http://support.microsoft.com/kb/192913/EN-US/ )BUG: EnableModeless Causes Events to Fire Late
Visual C++ 5.0 Online Help: Developer Products; Visual C++; Developer Studio Environment User's Guide; Automating Tasks in Developer Studio; Developer Studio Objects; Overview: Developer Studio Objects; Automating Developer Studio Tasks from Other Applications
MSDN Library: Platform SDK; COM and ActiveX Object Services; COM
Visual C++ 6.0 Online Help: Visual C++ Documentation; Using Visual C++; Visual C++ User's Guide; Automating Task's in Visual C++; Developer Studio Objects; Overview: Developer Studio Objects; Automating Developer Studio Tasks from Other Applications
Article ID: 192912 - Last Review: February 28, 2014 - Revision: 3.0