VB 对 CallApiByName 的一点改进

'枚举

DimlibNameAsString

PublicEnumDLL_Enum

kernel32_DLL=0'Windows32核心API库

user32_DLL=1'用户接口库

gdi32_DLL=2'图形设备接口API库

winmm_DLL=3'Windows多媒体API

Shell32_DLL=4'32位ShellAPI库

winspool_DRV=5'后台打印API

advapi32_DLL=6'高级安全与注册API库

comdlg32_DLL=7'通用对话框API

version_DLL=8'版本库

netapi32_DLL=9'Windows32位网络API库Lan

wininet_DLL=10'Windows32位网络APIInternet

mapi32_DLL=11'电子邮件的API

lz32_DLL=12'32位压缩API

mpr_DLL=13'多接口路由器库

EndEnum

PublicFunctionCallApiByName(Dll_LibAsDLL_Enum,这里省略了,2.0版的不同了

SelectCaseDll_Lib

Case0

libname="kernel32.DLL"'Windows32核心API库

Case1

libname="user32.DLL"'用户接口库

Case2

libname="gdi32.DLL"'图形设备接口API库

Case3

libname="winmm.DLL"'Windows多媒体API

Case4

libname="shell32.DLL"'32位ShellAPI库

Case5

libname="winspool.DRV"'后台打印API

Case6

libname="advapi32.DLL"'高级安全与注册API库

Case7

libname="comdlg32.DLL"'通用对话框API

Case8

libname="version.DLL"'版本库

Case9

libname="netapi32.DLL"'Windows32位网络API库Lan

Case10

libname="wininet.DLL"'Windows32位网络APIInternet

Case11

libname="mapi32.DLL"'电子邮件的API

Case12

libname="lz32.DLL"'32位压缩API

Case13

libname="mpr.DLL"'多接口路由器库

End Select

api

相关推荐