XP 上的 NetValidatePasswordPolicy 问题
我的项目有一个要求,在创建新帐户之前需要检查密码复杂性。
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);
我正在Windows XP上工作。当我尝试运行时,它提示警告说:
程序入口点NetValidPasswordPolicyFree无法位于动态链接库NETAPI32.dll中
从MSDN上说API是仅在2003服务器和2008服务器中有效。 这是否意味着它不能在XP上运行? 或者我可以找到任何其他 API 来执行与 NetValidPasswordPolicy 相同的操作吗?
我在谷歌上搜索了很多这个问题,发现有人问过类似的问题,但没有得到答复:(。所以,我在这里试试运气。
甚至我尝试在 Reflector 中分析 'NETAPI32.dll'
。 exe,但在打开 .dll 文件时出现错误: 未将对象引用设置为对象的实例。
我陷入困境,无法找到任何方法,我们将不胜感激: )
My project has a requirement that it needs to check the password complexity before create the 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 run, it prompt waring saying:
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?
I googled a lot for this issue and found someone had asked similar question but it went unanswered :(. So, here I am trying my luck.
Even I tried to analyze 'NETAPI32.dll'
in Reflector.exe, but while opening the .dll file it error out: Object reference not set to an instance of an object.
I am stuck badly and could not able to find any way. Any help will be appreciated :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题已经解决了:)。
'NETAPI32.dll'
中的NetValidPasswordPolicy
API 要求不支持“客户端”。由于此要求,我收到警告:未找到入口点。
我在 Windows 2003 服务器上尝试了我的项目,它成功了。
我关于“Reflector.exe”的第二个问题也是无效的,因为“NETAPI32.dll”不是 .Net dll,因此 Reflector 无法识别它。
Issue has been solved :).
NetValidPasswordPolicy
API from'NETAPI32.dll'
has requirements that it is not 'client' supported. Because of this requirement I am getting the warning:Entry point not found.
I tried my project on Windows 2003 server and it worked.
And my second question about 'Reflector.exe' is also invalid because
'NETAPI32.dll'
is not .Net dll so Reflector wont recognize it.