Answered by:
NetValidatePasswordPolicy issue on XP and Vista

Question
-
Folks
My project has a requirement that it needs to check the password complexity before create the new account.
My code looks like this :
NET_API_STATUS stat;
NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG InputArg = {0};
NET_VALIDATE_OUTPUT_ARG* pOutputArg = NULL;
wchar_t* wzServer = 0;
wchar_t wzPwd[32] = {0};
wprintf(L"Input the password to check: ");
wscanf(L"%s", wzPwd); // for example, the password is He12@#$DFE
InputArg.ClearPassword = wzPwd;
InputArg.PasswordMatch = TRUE;
stat = NetValidatePasswordPolicy(wzServer, NULL, NetValidatePasswordChange, &InputArg, (void**)&pOutputArg);
printf("stat = %d, ValidationStatus = %d\n", stat, pOutputArg->ValidationStatus);
NetValidatePasswordPolicyFree((void**)&pOutputArg);
return 0;
The code works well on vista, but when i try to run it on my XP, a warning message prompt. it said :
The procedure entry point NetValidPasswordPolicyFree could not be located in the dynamic link library NETAPI32.dll
From the MSDN it said the API is only valid in 2003 server and 2008 server.
Does it mean it can not work on XP?
Or can i find any other APIs to do the same thing as NetValidPasswordPolicy?
snaxum- Moved by nobugz Monday, August 25, 2008 8:28 AM Not BCL (Moved from .NET Base Class Library to Off-Topic Posts (Do Not Post Here))
Saturday, August 23, 2008 3:40 AM
Answers
-
Hello Snaxum,
Thank you for your post! Unfortunately there is not a current forum to post the question you are asking so I would recommend that you post you question to one of the microsoft.public.windowsxp.security_admin newsgroup located here: http://www.microsoft.com/communities/newsgroups/list/en-us/default.aspx?dg=microsoft.public.windowsxp.security_admin&cat=en_us_10f7d70c-420b-495e-99e8-61a7a64f2bb9&lang=en&cr=us
Hope that helps!
Sudarshan shindode Tier 2 Application Support Server and Tools Online Engineering Live Services Team- Proposed as answer by sudarshans1 Thursday, November 13, 2008 6:40 AM
- Marked as answer by ashawani_dubey Thursday, November 27, 2008 5:20 AM
Thursday, November 13, 2008 6:39 AM
All replies
-
Hello,
Thank you for your post! I would suggest creating a new thread for your question in the ( Forum discussion on the Windows Embedded Standard, the next generation of Windows XP Embedded. » Windows Embedded Standard » Misc » SIP API on xpe ?) forum located here: (http://forums.microsoft.com/EmbeddedWindows/ShowPost.aspx?PostID=3369797&SiteID=47).Hope that would be helpful.
Have a great day!
Thanks & regards,
Ashawani Tier 2 Application Support Server and Tools Online Engineering Live Services TeamThursday, November 13, 2008 6:37 AM -
Hello Snaxum,
Thank you for your post! Unfortunately there is not a current forum to post the question you are asking so I would recommend that you post you question to one of the microsoft.public.windowsxp.security_admin newsgroup located here: http://www.microsoft.com/communities/newsgroups/list/en-us/default.aspx?dg=microsoft.public.windowsxp.security_admin&cat=en_us_10f7d70c-420b-495e-99e8-61a7a64f2bb9&lang=en&cr=us
Hope that helps!
Sudarshan shindode Tier 2 Application Support Server and Tools Online Engineering Live Services Team- Proposed as answer by sudarshans1 Thursday, November 13, 2008 6:40 AM
- Marked as answer by ashawani_dubey Thursday, November 27, 2008 5:20 AM
Thursday, November 13, 2008 6:39 AM