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