hi folks,
I'm trying to check whether or not an application is running by testing whether a COM object exists for a given file (I can't use Process.GetProcessesByName() as the file I need to test is not the exe itself; we have a generic environment which runs a number of such apps and I need to be able to distinguish between them). In C++ I would attempt to bind to it and check whether or not I succeeded, though I'm unsure how to achieve the same thing with C#.
At first I thought this might work:
Code:
object obj = null;
try
{
obj = System.Runtime.InteropServices.Marshal.BindToMoniker(filemoniker);
but as you probably know that actually causes my application to run. So far googling hasn't helped, so any feedback would be much appreciated!
Ed.
Ne auderis delere orbem rigidum meum!