I need the following 2 delphi functions which must be called from a dll:
Both functions need to work in Delphi 2009.
!!Function UserExists (const username:pansichar):boolean;stdcall;
//returns true if the username exists on the local computer
function AddUser(const username,password:Pansichar;resetpassword:boolean):boolean;stdcall;
//if user does not exists, create a local username with the supplied password
//if resetpassword, then reset password to the supplied parameter
//add the user to the local administrators group (note that this must work on all languages, use the SID of the group)
//give the user the "run as a service" privilege.
//enable the user if it is disabled.