NetValidatePasswordPolicy issue on XP

My project requires me to check the password complexity before creating a new account.

My code looks like:

NET_API_STATUS status;
NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG inputArg = {0};
NET_VALIDATE_OUTPUT_ARG* pOutputArg = NULL;

inputArg.ClearPassword = NewPass;    
inputArg.PasswordMatch = TRUE;

status = NetValidatePasswordPolicy(DC, NULL, NetValidatePasswordChange,
            &inputArg, (void**)&pOutputArg);    
printf("status: %d, validationStatus: %d\n", status, pOutputArg->ValidationStatus);

NetValidatePasswordPolicyFree((void**)&pOutputArg);

I am working on Windows XP. When I try to start, it tells me that:

NetValidPasswordPolicyFree login point cannot be located in the NETAPI32.dll dynamic link library

From MSDN, he said the API is only valid on server 2003 and 2008 server. Does this mean that it cannot work on XP? Or can I find other APIs to do the same as NetValidPasswordPolicy?

I knew a lot about this problem and found that someone had asked a similar question, but he remained unanswered :( So, here I am trying my luck.

'NETAPI32.dll' Reflector.exe, DLL : ​​ .

. :)

+3
1

:).

NetValidPasswordPolicy API 'NETAPI32.dll' , . - : Entry point not found. Windows 2003, .

'Reflector.exe' , 'NETAPI32.dll' .Net dll, Reflector .

0

Source: https://habr.com/ru/post/1786332/


All Articles