找回密码
 加入
搜索
查看: 3047|回复: 6

LocalSecurityAuthority.au3与其它库冲突

[复制链接]
发表于 2009-10-28 13:08:58 | 显示全部楼层 |阅读模式
本帖最后由 xlcwxl 于 2009-10-28 13:41 编辑

#include <LocalSecurityAuthority.au3>
#include <GUIListBox.au3>
有冲突
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
;#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <LocalSecurityAuthority.au3>
#Region ### START Koda GUI section ### Form=
$Form3 = GUICreate("窗体1", 174, 231, 302, 218)
$List1 = GUICtrlCreateList("", 24, 40, 121, 123)
$Label1 = GUICtrlCreateLabel("本机所有用户列表", 24, 24, 100, 17)
$Combo1 = GUICtrlCreateCombo("Combo1", 24, 184, 129, 25)
$Label2 = GUICtrlCreateLabel("本机用户组", 24, 168, 64, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
user()

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

EndSwitch
WEnd

Func user()
$sSystem = ""
$aGroup = _LsaEnumerateLocalGroups($sSystem)
GUICtrlSetData($Combo1,$aGroup)
EndFunc
还有就是:LocalSecurityAuthority.au3用法
Func user()
$sSystem = ""
$aGroup = _LsaEnumerateLocalGroups($sSystem)
GUICtrlSetData($Combo1,$aGroup)
EndFunc
错在哪?

错误提示:
d:\demo\LocalSecurityAuthority.au3(44,109) : ERROR: $SE_CREATE_TOKEN_NAME previously declared as a 'Const'
If Not IsDeclared("SE_CREATE_TOKEN_NAME") Then GLOBAL CONST $SE_CREATE_TOKEN_NAME = "SeCreateTokenPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(45,128) : ERROR: $SE_ASSIGNPRIMARYTOKEN_NAME previously declared as a 'Const'
If Not IsDeclared("SE_ASSIGNPRIMARYTOKEN_NAME") Then GLOBAL CONST $SE_ASSIGNPRIMARYTOKEN_NAME = "SeAssignPrimaryTokenPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(46,106) : ERROR: $SE_LOCK_MEMORY_NAME previously declared as a 'Const'
If Not IsDeclared("SE_LOCK_MEMORY_NAME") Then GLOBAL CONST $SE_LOCK_MEMORY_NAME = "SeLockMemoryPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(47,115) : ERROR: $SE_INCREASE_QUOTA_NAME previously declared as a 'Const'
If Not IsDeclared("SE_INCREASE_QUOTA_NAME") Then GLOBAL CONST $SE_INCREASE_QUOTA_NAME = "SeIncreaseQuotaPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(48,124) : ERROR: $SE_UNSOLICITED_INPUT_NAME previously declared as a 'Const'
If Not IsDeclared("SE_UNSOLICITED_INPUT_NAME") Then GLOBAL CONST $SE_UNSOLICITED_INPUT_NAME = "SeUnsolicitedInputPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(49,118) : ERROR: $SE_MACHINE_ACCOUNT_NAME previously declared as a 'Const'
If Not IsDeclared("SE_MACHINE_ACCOUNT_NAME") Then GLOBAL CONST $SE_MACHINE_ACCOUNT_NAME = "SeMachineAccountPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(50,83) : ERROR: $SE_TCB_NAME previously declared as a 'Const'
If Not IsDeclared("SE_TCB_NAME") Then GLOBAL CONST $SE_TCB_NAME = "SeTcbPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(51,98) : ERROR: $SE_SECURITY_NAME previously declared as a 'Const'
If Not IsDeclared("SE_SECURITY_NAME") Then GLOBAL CONST $SE_SECURITY_NAME = "SeSecurityPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(52,115) : ERROR: $SE_TAKE_OWNERSHIP_NAME previously declared as a 'Const'
If Not IsDeclared("SE_TAKE_OWNERSHIP_NAME") Then GLOBAL CONST $SE_TAKE_OWNERSHIP_NAME = "SeTakeOwnershipPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(53,106) : ERROR: $SE_LOAD_DRIVER_NAME previously declared as a 'Const'
If Not IsDeclared("SE_LOAD_DRIVER_NAME") Then GLOBAL CONST $SE_LOAD_DRIVER_NAME = "SeLoadDriverPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(54,115) : ERROR: $SE_SYSTEM_PROFILE_NAME previously declared as a 'Const'
If Not IsDeclared("SE_SYSTEM_PROFILE_NAME") Then GLOBAL CONST $SE_SYSTEM_PROFILE_NAME = "SeSystemProfilePrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(55,104) : ERROR: $SE_SYSTEMTIME_NAME previously declared as a 'Const'
If Not IsDeclared("SE_SYSTEMTIME_NAME") Then GLOBAL CONST $SE_SYSTEMTIME_NAME = "SeSystemtimePrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(56,132) : ERROR: $SE_PROF_SINGLE_PROCESS_NAME previously declared as a 'Const'
If Not IsDeclared("SE_PROF_SINGLE_PROCESS_NAME") Then GLOBAL CONST $SE_PROF_SINGLE_PROCESS_NAME = "SeProfileSingleProcessPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(57,128) : ERROR: $SE_INC_BASE_PRIORITY_NAME previously declared as a 'Const'
If Not IsDeclared("SE_INC_BASE_PRIORITY_NAME") Then GLOBAL CONST $SE_INC_BASE_PRIORITY_NAME = "SeIncreaseBasePriorityPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(58,118) : ERROR: $SE_CREATE_PAGEFILE_NAME previously declared as a 'Const'
If Not IsDeclared("SE_CREATE_PAGEFILE_NAME") Then GLOBAL CONST $SE_CREATE_PAGEFILE_NAME = "SeCreatePagefilePrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(59,121) : ERROR: $SE_CREATE_PERMANENT_NAME previously declared as a 'Const'
If Not IsDeclared("SE_CREATE_PERMANENT_NAME") Then GLOBAL CONST $SE_CREATE_PERMANENT_NAME = "SeCreatePermanentPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(60,92) : ERROR: $SE_BACKUP_NAME previously declared as a 'Const'
If Not IsDeclared("SE_BACKUP_NAME") Then GLOBAL CONST $SE_BACKUP_NAME = "SeBackupPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(61,95) : ERROR: $SE_RESTORE_NAME previously declared as a 'Const'
If Not IsDeclared("SE_RESTORE_NAME") Then GLOBAL CONST $SE_RESTORE_NAME = "SeRestorePrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(62,98) : ERROR: $SE_SHUTDOWN_NAME previously declared as a 'Const'
If Not IsDeclared("SE_SHUTDOWN_NAME") Then GLOBAL CONST $SE_SHUTDOWN_NAME = "SeShutdownPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(63,89) : ERROR: $SE_DEBUG_NAME previously declared as a 'Const'
If Not IsDeclared("SE_DEBUG_NAME") Then GLOBAL CONST $SE_DEBUG_NAME = "SeDebugPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(64,89) : ERROR: $SE_AUDIT_NAME previously declared as a 'Const'
If Not IsDeclared("SE_AUDIT_NAME") Then GLOBAL CONST $SE_AUDIT_NAME = "SeAuditPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(65,127) : ERROR: $SE_SYSTEM_ENVIRONMENT_NAME previously declared as a 'Const'
If Not IsDeclared("SE_SYSTEM_ENVIRONMENT_NAME") Then GLOBAL CONST $SE_SYSTEM_ENVIRONMENT_NAME = "SeSystemEnvironmentPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
d:\demo\LocalSecurityAuthority.au3(66,112) : ERROR: $SE_CHANGE_NOTIFY_NAME previously declared as a 'Const'
If Not IsDeclared("SE_CHANGE_NOTIFY_NAME") Th
发表于 2009-10-28 13:34:24 | 显示全部楼层
错误提示呢?
发表于 2009-10-28 17:12:37 | 显示全部楼层
#include <LocalSecurityAuthority.au3>
必须放在所有#include的最后,其次那些错误只是ACNWrapper自检出错而已,你看其语句就知道了,直接选择继续

意思就是不用管他,只是误报而已,前提是#include <LocalSecurityAuthority.au3>是最后一个#include

评分

参与人数 1金钱 +10 收起 理由
pusofalse + 10 ^_^

查看全部评分

发表于 2009-10-28 17:37:10 | 显示全部楼层
_LsaEnumerateLocalGroups返回的是数组。
发表于 2009-10-28 18:43:36 | 显示全部楼层
本帖最后由 netegg 于 2009-10-28 18:45 编辑

$SE_SYSTEM_ENVIRONMENT_NAME这一堆东西已经定义为常量,不能重复定义为全局常量
检查一下其他库,是不是有同名变量
发表于 2010-2-2 06:21:11 | 显示全部楼层
回复 5# netegg


    我连这个文件都找不到呢
发表于 2010-2-2 11:23:09 | 显示全部楼层
传送门:http://www.autoitx.com/forum.php ... &from=favorites
楼上请看。。。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-12-29 15:21 , Processed in 0.082711 second(s), 28 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表