user on WINDOWS NT

I would create a delphi program to create new user (with password, mail box on outlook server, ecc. ) within my network WINDOWS NT based.
It's this possible?
You can help me to do this

poc3796Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

poc3796Author Commented:
Edited text of question.
0
poc3796Author Commented:
Edited text of question.
0
MadshiCommented:
Use NetUserAdd.

Regards, Madshi.
0
poc3796Author Commented:
i look for help on win32 and I see that I have to create a data structure to using this Api but I can understand very well how to do this in delphi...

can you help me?

another question: I would add this user also to Exchange server, when I create the user from NT the user manager open the second windows where I can put information I can do this in program

please help
and excuse my bad english
0
MadshiCommented:
The structure should look like this:

type
  TUserInfo1 = packed record
    name         : PWideChar;
    password     : PWideChar;
    password_age : DWord;
    priv         : DWord;
    home_dir     : PWideChar;
    comment      : PWideChar;
    flags        : DWord;
    script_path  : PWideChar;
  end;

The function declaration like this:

function NetUserAdd(server: PWideChar; level: DWord; var info: TUserInfo1; var out: DWord) : DWord; stdCall;
         external 'netapi32.dll' name 'NetUserAdd';

Regards, Madshi.

P.S: I didn't understand your "another question". I don't have NT here right now, so I can't check this second window. I can't tell you more than what is written in the NetUserAdd documentation (and perhaps how to use it in Delphi).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.