附:在delphi帶的win32 developer's references檢視user_info_1 ,知道所用標頭檔案是lmaccess.h,但是delphi並沒有帶這個檔案,pb帶了這個檔案,裡面確實有常數user_priv_user 的定義,下面的內容是從網上找到的。
const
se_create_token_name ='secreatetokenprivilege';
se_assignprimarytoken_name ='seassignprimarytokenprivilege';
se_lock_memory_name ='selockmemoryprivilege';
se_increase_quota_name ='seincreasequotaprivilege';
se_unsolicited_input_name ='seunsolicitedinputprivilege';
se_machine_account_name ='semachineaccountprivilege';
se_tcb_name ='setcbprivilege';
se_security_name ='sesecurityprivilege';
se_take_ownership_name ='setakeownershipprivilege';
se_load_driver_name ='seloaddriverprivilege';
se_system_profile_name ='sesystemprofileprivilege';
se_systemtime_name ='sesystemtimeprivilege';
se_prof_single_process_name ='seprofilesingleprocessprivilege';
se_inc_base_priority_name ='seincreasebasepriorityprivilege';
se_create_pagefile_name ='secreatepagefileprivilege';
se_create_permanent_name ='secreatepermanentprivilege';
se_backup_name ='sebackupprivilege';
se_restore_name ='serestoreprivilege';
se_shutdown_name ='seshutdownprivilege';
se_debug_name ='sedebugprivilege';
se_audit_name ='seauditprivilege';
se_system_environment_name ='sesystemenvironmentprivilege';
se_change_notify_name ='sechangenotifyprivilege';
se_remote_shutdown_name ='seremoteshutdownprivilege';
user_priv_mask =$3;
user_priv_guest =0;
user_priv_user =1;
user_priv_admin =2;
uf_script =$0001;
uf_accountdisable =$0002;
uf_homedir_required =$0008;
uf_lockout =$0010;
uf_passwd_notreqd =$0020;
uf_passwd_cant_change =$0040;
// // account type bits as part of usri_flags.
// uf_temp_duplicate_account =$0100;
uf_normal_account =$0200;
uf_interdomain_trust_account =$0800;
uf_workstation_trust_account =$1000;
uf_server_trust_account =$2000;
uf_machine_account_mask =( uf_interdomain_trust_account or
uf_workstation_trust_account or
uf_server_trust_account );
uf_account_type_mask =(
uf_temp_duplicate_account or
uf_normal_account or
uf_interdomain_trust_account or
uf_workstation_trust_account or
uf_server_trust_account
); uf_dont_expire_passwd =$10000;
uf_mns_logon_account =$20000;
uf_settable_bits =(
uf_script or
uf_accountdisable or
uf_lockout or
uf_homedir_required or
uf_passwd_notreqd or
uf_passwd_cant_change or
uf_account_type_mask or
uf_dont_expire_passwd or
uf_mns_logon_account
); type
_user_info_1 = record
usri1_name: pwidechar;
usri1_password: pwidechar;
usri1_password_age: cardinal;
usri1_priv: cardinal;
usri1_home_dir: pwidechar;
usri1_comment: pwidechar;
usri1_flags: cardinal;
usri1_script_path: pwidechar;
end;
_localgroup_members_info_0 = record
lgrmi0_sid: cardinal;
end;
_localgroup_members_info_3 = record
lgrmi3_domainandname: pwidechar;
end;
提高sql質量,增加查詢速度
應盡量避免在 where 子句中使用 或 操作符,否則將引擎放棄使用索引而進行全表掃瞄。對查詢進行優化,應盡量避免全表掃瞄,首先應考慮在 where 及 order by 涉及的列上建立索引。應盡量避免在 where 子句中對字段進行 null 值判斷,否則將導致引擎放棄使用索引而進行全表掃瞄,如 ...
SQL 優化增加查詢的範圍限制
第三掌 增加查詢的範圍限制 增加查詢的範圍限制,避免全範圍的搜尋。例3 以下查詢表record 中時間actiontime小於2001年3月1日的資料 select from record where actiontime to date 20010301 yyyymm 查詢計畫表明,上面的查詢對錶...
mysql 中如何增加查詢排序效能
這塊的學習領域在高效能mysql中175頁使用索引排序,查詢官方的總比我寫的好一些 前言 在索引中,每種索引的儲存方式都是不同在,在innodb中,儲存方式可以概括為 儲存事務id 回滾事務id,主鍵索引,還有其他列的索引 因為有其他列的索引存在的關係,加入查詢的條件在索引的範圍以內,它就可以不用回...