首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

advapi32.dll 引用不成功?解决方案

2012-01-26 
advapi32.dll 引用不成功??PublicDeclareFunctionLookupPrivilegeValueLibadvapi32.dll AliasLookupPri

advapi32.dll 引用不成功??
Public   Declare   Function   LookupPrivilegeValue   Lib   "advapi32.dll "   Alias   "LookupPrivilegeValueA "   (ByVal   lpSystemName   As   String,   ByVal   lpName   As   String,   lpLuid   As   LUID)   As   Long
Public   Declare   Function   AdjustTokenPrivileges   Lib   "advapi32.dll "   (ByVal   TokenHandle   As   Long,   ByVal   DisableAllPrivileges   As   Long,   NewState   As   TOKEN_PRIVILEGES,   ByVal   BufferLength   As   Long,   PreviousState   As   TOKEN_PRIVILEGES,   ReturnLength   As   Long)   As   Long

我这样的引用语法有什么问题吗?为什么提示用户类型未定义?。我查找   SYSTEM32   文件夹下明明有   advapi32.dll   呀。。奇怪。。麻烦各位帮忙找下原因。谢谢

[解决办法]
Type TOKEN_PRIVILEGES
PrivilegeCount As Long
Privileges(ANYSIZE_ARRAY) As LUID_AND_ATTRIBUTES
End Type

Type LUID
LowPart As Long
HighPart As Long
End Type

热点排行