📄 moduleapi.bas
字号:
Attribute VB_Name = "ModuleAPI"
Public Declare Function OpenProcess Lib "kernel32" _
( _
ByVal dwDesiredAccess As Long, _
ByVal bInheritHandle As Long, _
ByVal dwProcessId As Long _
) As Long
Public Declare Function TerminateProcess Lib "kernel32" _
( _
ByVal hProcess As Long, _
ByVal uExitCode As Long _
) As Long
Public Declare Function Process32First Lib "kernel32" _
( _
ByVal hSnapshot As Long, _
lppe As PROCESSENTRY32 _
) As Long
Public Declare Function Process32Next Lib "kernel32" _
( _
ByVal hSnapshot As Long, _
lppe As PROCESSENTRY32 _
) As Long
Public Declare Function CreateToolhelp32Snapshot Lib "kernel32" _
( _
ByVal dwFlags As Long, _
ByVal th32ProcessID As Long _
) As Long
Public Const TH32CS_SNAPPROCESS = &H2&
Public Const PROCESS_ALL_ACCESS = &H1F0FFF
Public Type PROCESSENTRY32
dwSize As Long
cntUsage As Long
th32ProcessID As Long
th32DefaultHeapID As Long
th32ModuleID As Long
cntThreads As Long
th32ParentProcessID As Long
pcPriClassBase As Long
dwFlags As Long
szExeFile As String * 260
End Type
Declare Function GetLogicalDrives Lib "kernel32" () As Long
Declare Function FindClose Lib "kernel32" (ByVal hFindFile As Long) As Long
Declare Function FindFirstFile Lib "kernel32" Alias "FindFirstFileA" (ByVal lpFileName As String, lpFindFileData As WIN32_FIND_DATA) As Long
Declare Function FindNextFile Lib "kernel32" Alias "FindNextFileA" (ByVal hFindFile As Long, lpFindFileData As WIN32_FIND_DATA) As Long
Public Const BIF_RETURNONLYFSDIRS = &H1
Public Const MAX_PATH = 260
Type FILETIME
dwLowDateTime As Long
dwHighDateTime As Long
End Type
Type WIN32_FIND_DATA
dwFileAttributes As Long
ftCreationTime As FILETIME
ftLastAccessTime As FILETIME
ftLastWriteTime As FILETIME
nFileSizeHigh As Long
nFileSizeLow As Long
dwReserved0 As Long
dwReserved1 As Long
cFileName As String * MAX_PATH
cAlternate As String * 14
End Type
Public Const FILE_ATTRIBUTE_DIRECTORY = &H10
Public Const FILE_ATTRIBUTE_NORMAL = &H80
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Public Declare Function GetFileAttributes Lib "kernel32" Alias "GetFileAttributesA" (ByVal lpFileName As String) As Long
Public Declare Function SetFileAttributes Lib "kernel32" Alias "SetFileAttributesA" (ByVal lpFileName As String, ByVal dwFileAttributes As Long) As Long
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -