用ADSI目录服务接口,到MS去下载一个SDK,一切高顶

解决方案 »

  1.   

    to: zx_wang(wzx) 
       能否详细些。
      

  2.   

    Active Directory Service Interface
      

  3.   

    可以使用netuseradd在WINNT中添加用户 type USER_INFO_1=record
           usri1_name:pwidechar;
           usri1_password:pwidechar;
           usri1_password_age:dword;
           usri1_priv:dword;
           usri1_home_dir:pwidechar;
           usri1_comment:pwidechar;
           usri1_flags:dword;
           usri1_script_path:pwidechar;
         end;
        buffer=^USER_INFO_1;
    .....
    procedure TForm1.Button1Click(Sender: TObject);
    var buf:buffer;
        error:pchar;
    begin
     getmem(buf,sizeof(USER_INFO_1));
     with buf^ do
     begin
      usri1_name:='123e';
      usri1_password:='123456789';
      usri1_password_age:=0;
      usri1_priv:=1;
      usri1_home_dir:=nil;
      usri1_comment:=nil;
      usri1_flags:=1;
      usri1_script_path:=nil;
     end;
      //netuseradd(nil,1,pointer(buf),
      showmessage(inttostr(netuseradd(nil,1,pointer(buf),0)));
      freemem(buf);
    end;