"Ram" <ni***@bezeqint.net> wrote in message
news:OM**************@TK2MSFTNGP11.phx.gbl...
You want to change it's password where - on WinNT? ActiveDirectory?
--Ram
Both. I figgured out the code last night. Hopefully this will help someone
else!
// Allows password change for domain or local system
[DllImport("netapi32.dll", CharSet=CharSet.Auto)]
private extern static int NetUserChangePassword(
[MarshalAs(UnmanagedType.LPWStr)] string domainName, // set to null for
local machine/domain
[MarshalAs(UnmanagedType.LPWStr)] string userName, // set to null for
local user
[MarshalAs(UnmanagedType.LPWStr)] string oldPass,
[MarshalAs(UnmanagedType.LPWStr)] string newPass);