Esempio n. 1
0
        private string QueryProcessImageName(SafeProcessHandle handle, ProcessQueryImageNameMode mode)
        {
            StringBuilder moduleBuffer = new StringBuilder(1024);
            int           size         = moduleBuffer.Capacity;

            NativeMethods.QueryFullProcessImageName(
                handle, mode, moduleBuffer, ref size);
            if (mode == ProcessQueryImageNameMode.NativeSystemFormat)
            {
                moduleBuffer.Insert(0, "\\\\?\\GLOBALROOT");
            }
            return(moduleBuffer.ToString());
        }
Esempio n. 2
0
 public static extern uint QueryFullProcessImageName(
     SafeProcessHandle hProcess,
     [MarshalAs(UnmanagedType.U4)] ProcessQueryImageNameMode flags,
     [Out] StringBuilder lpImageName, ref int size);
Esempio n. 3
0
 private string QueryProcessImageName(SafeProcessHandle handle, ProcessQueryImageNameMode mode)
 {
     StringBuilder moduleBuffer = new StringBuilder(1024);
       int size = moduleBuffer.Capacity;
       NativeMethods.QueryFullProcessImageName(
     handle, mode, moduleBuffer, ref size);
       if (mode == ProcessQueryImageNameMode.NativeSystemFormat)
     moduleBuffer.Insert(0, "\\\\?\\GLOBALROOT");
       return moduleBuffer.ToString();
 }