[DllImport("kernel32.dll")]
static extern bool Process32First(IntPtr hSnapshot, ref PROCESSENTRY32 lppe);
None.
None.
Please add some!
[StructLayout(LayoutKind.Sequential)]
public struct PROCESSENTRY32
{
public uint dwSize;
public uint cntUsage;
public uint th32ProcessID;
public IntPtr th32DefaultHeapID;
public uint th32ModuleID;
public uint cntThreads;
public uint th32ParentProcessID;
public int pcPriClassBase;
public uint dwFlags;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=256)] public string szExeFile;
};
PROCESSENTRY32 info = new PROCESSENTRY32();
bool first = Process32First(Shot, ref info);
if (!first) { throw( new Exception("CANT FIRST"));};
while(Process32Next((int)Shot, ref info) != 0)
{
// Do some with Info
};
Do you know one? Please contribute it!