Dear all, I would like to enter a VB.Net code to change my windows password. Any experiences for doing so? I have tried:
Dim res As NET_API_STATUS = NetUserChangePassword(Environment.UserDomainName, Environment.UserName, oldPass, newPass)
If res <> NET_API_STATUS.NERR_Success Then
Throw New ApplicationException(“Error setting password - Error code:” &res.ToString())
End If
However, I am getting the following error:
Error compeling code:
Error BC30002 Type: NET_API_STATUS is not defined. At line 1 Error BC30451: NET_API_STATUS is not declared. It might be due to its protection level at line 2.
Thanks!