|
|
| How to use NetValidatePasswordPolicy API? |
|
| Author |
Message |
stevenzhang123

|
Posted: Visual C++ Language, How to use NetValidatePasswordPolicy API? |
Top |
Hello,
Thank you in advance.
I have a question on using NetValidatePasswordPolicy API.
/// <summary>
/// NET_API_STATUS NetValidatePasswordPolicy(
/// LPCWSTR ServerName,
/// LPVOID Qualifier,
/// NET_VALIDATE_PASSWORD_TYPE ValidationType,
/// LPVOID InputArg,
/// LPVOID OutputArg
/// );
/// </summary>
[ DllImport("netapi32.dll", EntryPoint = "NetValidatePasswordPolicy", SetLastError = true)]
public static extern PolicyValidationDataTypes.NET_API_STATUS NetValidatePasswordPolicy(
string ServerName
, IntPtr Qualifier
, PolicyValidationDataTypes.NET_VALIDATE_PASSWORD_TYPE validationType
, IntPtr InputArg
, out IntPtr OutputArg);
The InputArg is mysterious to me. Does anybody know how to constuct a InputArg, whose type is
NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG.
Thanks.
sincerely,
zhang
Visual C++13
|
| |
|
| |
 |
Sarath.

|
Posted: Visual C++ Language, How to use NetValidatePasswordPolicy API? |
Top |
|
| |
 |
stevenzhang123

|
Posted: Visual C++ Language, How to use NetValidatePasswordPolicy API? |
Top |
I just need a sample inputArgs for "Change_Password" operation.
Can you help me out
thanks,
zhang
|
| |
|
| |
 |
stevenzhang123

|
Posted: Visual C++ Language, How to use NetValidatePasswordPolicy API? |
Top |
Got it work.
I changed the way.
Instead of using c# pinvoke approach, I call the api through Managed C++. Then call the managed c++ with C#.
The things looks much more cleaner and readable.
|
| |
|
| |
 |
decdan

|
Posted: Visual C++ Language, How to use NetValidatePasswordPolicy API? |
Top |
Any chance you could post your c++ code (I'm not a c++ person and would like to get the NetValidatePasswordPolicy
call working too)
|
| |
|
| |
 |
| |
|