密码历史要求 - 窗口

时间:2014-12-17 17:38:57

标签: c++ windows passwords local-security-policy

在Windows本地组策略中,我们有最小密码长度,密码历史记录要求等。所以我想使用c ++以编程方式检索最小密码长度和密码历史记录要求

1 个答案:

答案 0 :(得分:0)

找到解决方案

We can use window's NET_API_STATUS NetUserModalsGet(
  _In_opt_  LPCWSTR servername,
  _In_      DWORD level,
  _Out_     LPBYTE *bufptr
);    API and access the structure _USER_MODALS_INFO_0 to retrieve the minimum length and password history requirement 
ie minlenght =bufptr->usrmod0_min_passwd_len; 
   minhistReq=bufptr->usrmod0_min_passwd_age;
相关问题