Example #1
0
        public bool IsManaged()
        {
            try {
                var process = Win32.GetProcess(Handle);
                if (process.Modules != null)
                {
                    foreach (object obj in process.Modules)
                    {
                        ProcessModule processModule = (ProcessModule)obj;
                        if (processModule.ModuleName.StartsWith("mscorlib", StringComparison.InvariantCultureIgnoreCase) || processModule.ModuleName.Equals("mscorlib.ni.dll", StringComparison.InvariantCultureIgnoreCase))
                        {
                            return(true);
                        }
                    }
                    return(false);
                }
            }
            catch
            {
            }

            return(false);
        }
Example #2
0
 public Process GetProcess()
 {
     return(Win32.GetProcess(Handle));
 }