lcloki Posted August 22, 2005 Share Posted August 22, 2005 Hello, there ... I am getting 2 from @error after calling this call expandcollapse popupFunc showVar($var, $name="unnamed") $tmp = "--------------------------------" & @CRLF If IsArray($var) Then For $i = 0 To UBound $tmp &= " #" & $i & ": " & $tmp[$i] Next Else $tmp &= $name & ": " & $var EndIf Return $tmp EndFunc Func _NetLocalGroupEnum($servername="", $level=0) Local $arr[1] ; NET_API_STATUS NetLocalGroupEnum( ; LPCWSTR servername, ; DWORD level, ; LPBYTE* bufptr, ; DWORD prefmaxlen, ; LPDWORD entriesread, ; LPDWORD totalentries, ; PDWORD_PTR resume_handle ; ); If $level = 0 Then $bufptr = DllStructCreate("ptr") ; GROUP_INFO_0 Else MsgBox(0, "", "failed!") EndIf $hresume = DllStructCreate("ptr") $entriesread = 0 $totalentries = 0 $res = DllCall( "netapi32.dll", "long", "NetLocalGroupEnum", _ "wstr", $servername, _ "int", $level, _ "long", DllStructGetPtr($bufptr), _ "int", -1, _ "ptr_int", $entriesread, _ "ptr_int", $totalentries, _ "long", DllStructGetPtr($hresume) _ ) ;#cs MsgBox(0, "", "@error: " & @error & @CRLF & _ showVar($res, "res") ) ;#ce EndFunc Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now