Re 5#:
- -||| Sorry, 其实我会。我本想着告诉楼主应该调用的函数之后,楼主你自己应该可以完成调用。完整代码如下:Func _NetUserSetInfo($sUserName, $iLevel, $pBuffer, $sType = "ptr", $sSystem = "")
Local $iResult
$iResult = DllCall("Netapi32.dll", "long", "NetUserSetInfo", "wstr", $sSystem, _
"wstr", $sUserName, "dword", $iLevel, _
$sType, $pBuffer, "dword*", 0)
Return SetError($iResult[0], 0, $iResult[0] = 0)
EndFunc ;==>_NetUserSetInfo
Const $UF_PASSWD_CANT_CHANGE = 0x40 ; User can not change the password.
Const $UF_DONT_EXPIRE_PASSWD = 0x10000 ; Password is never expired.
$iFlags = bitOR($UF_PASSWD_CANT_CHANGE, $UF_DONT_EXPIRE_PASSWD)
If _NetUserSetInfo("Test", 1008, $iFlags, "dword*") Then
Msgbox(0, "", "Succeeded")
Else
Msgbox(0, "", "Error code: " & @error)
EndIf
|