PB 11.5做的当前用户权限下所有正在运行程序,主要代码:
Function Long EnumProcesses(Ref ULong lpidProcess[], Long cb, Ref Long cbNeeded) Library 'psapi.dll '
Function Long OpenProcess(Long dwDesiredAccess, Int bInheritHandle, Long dwProcessId) Library 'kernel32.dll '
Function Long GetModuleFileNameEx(Long hProcess, Long hModule, Ref String ModuleName, Long nSize) Library 'psapi.dll ' Alias For "GetModuleFileNameExA;ansi"
Function Long EnumProcessModules(Long hProcess, Ref ULong lphModule[], Long cb, Ref Long cbNeeded) Library 'psapi.dll '
Function Long GetModuleBaseName(Long hProcess, Long hModule, Ref String lpBaseName, Long nSize) Library 'psapi.dll ' Alias For "GetModuleBaseNameA;ansi"
Function Long CloseHandle(Long Handle) Library 'kernel32.dll '
FUNCTION ulong IsWindow(ulong hwnd) LIBRARY "user32.dll "
FUNCTION ulong GetWindowText(ulong hwnd,ref string lpString,ulong cch) LIBRARY "user32.dll " ALIAS FOR "GetWindowTextA;ansi"
1