Gut dann hat sich das mit shl 1 geklärt.
NetAPIBufferFree ist noch aus dem Copy and paste von ModifyUser übriggeblieben.
Die
Jedi Deklaration sieht so aus:
Delphi-Quellcode:
PUserInfo3 = ^TUserInfo3;
{$EXTERNALSYM _USER_INFO_3}
_USER_INFO_3 = record
usri3_name: LPWSTR;
usri3_password: LPWSTR;
usri3_password_age: DWORD;
usri3_priv: DWORD;
usri3_home_dir: LPWSTR;
usri3_comment: LPWSTR;
usri3_flags: DWORD;
usri3_script_path: LPWSTR;
usri3_auth_flags: DWORD;
usri3_full_name: LPWSTR;
usri3_usr_comment: LPWSTR;
usri3_parms: LPWSTR;
usri3_workstations: LPWSTR;
usri3_last_logon: DWORD;
usri3_last_logoff: DWORD;
usri3_acct_expires: DWORD;
usri3_max_storage: DWORD;
usri3_units_per_week: DWORD;
usri3_logon_hours: PBYTE;
usri3_bad_pw_count: DWORD;
usri3_num_logons: DWORD;
usri3_logon_server: LPWSTR;
usri3_country_code: DWORD;
usri3_code_page: DWORD;
usri3_user_id: DWORD;
usri3_primary_group_id: DWORD;
usri3_profile: LPWSTR;
usri3_home_dir_drive: LPWSTR;
usri3_password_expired: DWORD;
end;
TUserInfo3 = _USER_INFO_3;
{$EXTERNALSYM USER_INFO_3}
USER_INFO_3 = _USER_INFO_3;
Delphi-Quellcode:
{$EXTERNALSYM NetUserAdd}
function NetUserAdd(servername: LPCWSTR; level: DWORD; buf: Pointer;
parm_err: PDWORD): NET_API_STATUS; stdcall;
Ich bin da jetzt noch nicht viel weitergekommen.