2013/04/03(Wed) 17:01:53 編集(投稿者)
■No66125 ( ku-tuka さん) に返信
handle = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)
↓
Process32First(handle, peBytes() as Byte)
(2順目以降は Process32Next(handle, peBytes() as Byte))
↓
peBytes => PROCESSENTRY32
変換ロジック例
Dim mem As New MemoryStream(peBytes)
Dim rd As New BinaryReader(mem)
dwSize = rd.ReadUInt32()
cntUsage = rd.ReadUInt32()
th32ProcessID = rd.ReadInt32()
th32DefaultHeapID = rd.ReadUInt32()
th32ModuleID = rd.ReadUInt32()
cntThreads = rd.ReadUInt32()
th32ParentProcessID = rd.ReadInt32()
pcPriClassBase = rd.ReadInt32()
dwFlags = rd.ReadUInt32()
Dim bytExeFiles = New Byte(MAX_PATH) {}
rd.Read(bytExeFiles, 0, MAX_PATH)
szExeFile = Encoding.Unicode.GetString(bytExeFiles, 0, MAX_PATH)
szExeFile = szExeFile.TrimEnd(CChar(vbNullChar))
th32MemoryBase = rd.ReadUInt32()
th32AccessKey = rd.ReadUInt32()
rd.Close()
↓
PROCESSENTRY32.szExeFileにてExeを判断
という手順でプロセスを列挙してExeを判断するとよいです。