This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.InteropServices; | |
using System.Threading; | |
using EnvDTE; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
namespace DteTestClassNamespace | |
{ | |
[TestClass] | |
public class DteTestClass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IntPtr hWnd = IntPtr.Zero; | |
Process currentProcess = Process.GetCurrentProcess(); | |
Process[] processes = Process.GetProcessesByName(currentProcess.ProcessName); | |
foreach (Process process in processes) | |
{ | |
// Get the first instance that is not this instance, has the | |
// same process name and was started from the same file name | |
// and location. | |
// Also check that the process has a valid |
NewerOlder