lcloki Posted August 22, 2005 Share Posted August 22, 2005 Hello there ...I am getting 2 from @error after calling this call.The documentations means:@error = 2 unknown "return type".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 _NetLocalGroupEnum()Does anybody know whats wrong? I looked for NET_API_STATUS a it should be and long value. See here for example.MSDN Library & NetLocalGroupEnum Link to comment Share on other sites More sharing options...
Developers Jos Posted August 22, 2005 Developers Share Posted August 22, 2005 (edited) Hello there ...I am getting 2 from @error after calling this call.<{POST_SNAPBACK}>"ptr_int" is not a valid value..... Edited August 22, 2005 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
lcloki Posted August 22, 2005 Author Share Posted August 22, 2005 thx, that was it ... studip mistake ... 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