No navigation frame on the left?  Click here.

NetUserChangePassword

The sample below demonstrates changing a user's password.  If an old password is given, the code assumes that a user is changing his own password and invokes NetuserChangePassword(); else, NetUserSetInfo() gets called.  The latter requires administrative privileges (or Account Operator privileges, as long as the account to change is not an admin account).

nucp.cpp, 2 KB, NetUserChangePassword()