'枚举
Dim libName As String
Public Enum
DLL_Enum
kernel32_DLL =
0 'Windows 32核心API库
user32_DLL = 1 '用户接口库
gdi32_DLL = 2 '图形设备接口API库
winmm_DLL = 3 'Windows多媒体API
Shell32_DLL = 4 '32位Shell API库
winspool_DRV = 5 '后台打印API
advapi32_DLL = 6 '高级安全与注册API库
comdlg32_DLL = 7 '通用对话框API
version_DLL = 8 '版本库
netapi32_DLL = 9 'Windows 32位网络API库 Lan
wininet_DLL = 10 'Windows 32位网络API Internet
mapi32_DLL = 11 '电子邮件的API
lz32_DLL = 12 '32位压缩API
mpr_DLL = 13 '多接口路由器库
End Enum
Public Function
CallApiByName(Dll_Lib As DLL_Enum, 这里省略了, 2.0版的不同了
Select Case Dll_Lib
Case 0
libName = "kernel32.DLL" 'Windows 32核心API库
Case 1
libName = "user32.DLL" '用户接口库
Case 2
libName = "gdi32.DLL" '图形设备接口API库
Case 3
libName = "winmm.DLL" 'Windows多媒体API
Case 4
libName = "shell32.DLL" '32位Shell API库
Case 5
libName = "winspool.DRV" '后台打印API
Case 6
libName = "advapi32.DLL" '高级安全与注册API库
Case 7
libName = "comdlg32.DLL" '通用对话框API
Case 8
libName = "version.DLL" '版本库
Case 9
libName = "netapi32.DLL" 'Windows 32位网络API库 Lan
Case 10
libName = "wininet.DLL" 'Windows 32位网络API Internet
Case 11
libName = "mapi32.DLL" '电子邮件的API
Case 12
libName = "lz32.DLL" '32位压缩API
Case 13
libName = "mpr.DLL" '多接口路由器库
End Select


 
目前有0条回应
Comment
Trackback
你目前的身份是游客,请输入昵称和电邮!