Users := GetUsersArray() For Each, User in Users UserList .= "User " Each ": " User "`n" if UserList Msgbox % UserList "`n从数组调用用户2:" Users.2 GetUsersArray() { err := DllCall( "Netapi32\NetUserEnum", "Str", "", "UInt", 0, "UInt", 0x2, "Ptr*", pBuf, "UInt", -1, "UInt*", entRead, "UInt*", 0 , "Ptr", 0 ) if ( err != false || entRead = 0 ) { MsgBox 0x10, Error, 无法检索用户条目! Return } Loop % ( entRead, uArr := [] ) uArr.Push( StrGet( NumGet( pBuf + ( A_Index-1 ) * A_PtrSize ), "utf-16" ) ) DllCall( "Netapi32\NetApiBufferFree", "Ptr", pBuf ) Return uArr }
声明:站内资源为整理优化好的代码上传分享与学习研究,如果是开源代码基本都会标明出处,方便大家扩展学习路径。请不要恶意搬运,破坏站长辛苦整理维护的劳动成果。本站为爱好者分享站点,所有内容不作为商业行为。如若本站上传内容侵犯了原著者的合法权益,请联系我们进行删除下架。
评论(0)