LogonUser |
= |
Windows::API.new('LogonUser', 'SSSLLP', 'I', 'advapi32') |
USER_INFO_3 |
= |
[ [:name, nil], [:password, nil], [:password_age, 0], [:priv, 0], #"The NetUserAdd and NetUserSetInfo functions ignore this member" [:home_dir, nil], [:comment, nil], [:flags, UF_SCRIPT|UF_DONT_EXPIRE_PASSWD|UF_NORMAL_ACCOUNT], [:script_path, nil], [:auth_flags, 0], [:full_name, nil], [:user_comment, nil], [:parms, nil], [:workstations, nil], [:last_logon, 0], [:last_logoff, 0], [:acct_expires, -1], [:max_storage, -1], [:units_per_week, 0], [:logon_hours, nil], [:bad_pw_count, 0], [:num_logons, 0], [:logon_server, nil], [:country_code, 0], [:code_page, 0], [:user_id, 0], [:primary_group_id, DOMAIN_GROUP_RID_USERS], [:profile, nil], [:home_dir_drive, nil], [:password_expired, 0] |
|
[:symbol_name, default_val] default_val duals as field type array index
duals as structure offset
|
USER_INFO_3_TEMPLATE |
= |
USER_INFO_3.collect { |field| field[1].class == Fixnum ? 'i' : 'L' }.join |
SIZEOF_USER_INFO_3 |
= |
#sizeof(USER_INFO_3) USER_INFO_3.inject(0){|sum,item| sum + (item[1].class == Fixnum ? 4 : PTR_SIZE) |