NetUserSetGroups(20分)

  • 主题发起人 主题发起人 lb_icesea79
  • 开始时间 开始时间
L

lb_icesea79

Unregistered / Unconfirmed
GUEST, unregistred user!
NET_API_STATUS NetUserSetGroups(LPCWSTR servername, LPCWSTR username, DWORD Level, LPBYTE buf, DWORD num_entries);<br><br>function NetUserSetGroups(servername, username: LPCWSTR; level: DWORD; buf: Pointer; num_entries: DWORD): NET_API_STATUS;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; stdcall;external 'Netapi32.DLL' name 'NetUserSetGroups';<br><br>function TForm1.lbNetUserSetGroups2(AUser: String): DWORD;<br>var<br> &nbsp;ws_tmp, ws_tmp2: WideString;<br> &nbsp;AGroups: TGROUP_USERS_INFO_0;<br> &nbsp;num_entries : DWORD;<br>begin<br> &nbsp;ws_tmp := AUser;<br> &nbsp;num_entries := 0;<br> &nbsp;ws_tmp2 := 'Guests';<br> &nbsp;AGroups.grui0_name := PWideChar(ws_tmp2);<br> &nbsp;Result:=NetUserSetGroups(nil, PWideChar(ws_tmp), num_entries, @AGroups, 1);<br> &nbsp;Memo1.Lines.Add(PrintError('NetUserSetGroups'));<br>end;<br><br>运行结果:NetUserSetGroups 调用失败 997 (重叠 I/O 操作在进行中。)
 
请 CAKK 帮忙看看
 
呵呵, 有进展了:) &nbsp; NetUserSetGroups 不能用 GetLastError 检查错误
 
呵呵, 搞定了.
 
哪位进来收分
 
后退
顶部