I need to be able to validate the windows password of the account that is currently logged in. I've managed to do this when the unit has a password. But if it does not have a password, passing an empty string does not work. It fails each time.

I've been looking around, but haven't been able to find much on this. Does anyone know how to determine if the user password is empty?

Below is the API I'm using. But I don't think it will be used for this.

VB.NET Code:
  1. Private Declare Auto Function LogonUser Lib "advapi32.dll" (ByVal lpszUsername As String, ByVal lpszDomain As String, ByVal lpszPassword As String, _
  2.                                                                 ByVal dwLogonType As LogonType, ByVal dwLogonProvider As Integer, ByRef phToken As IntPtr) As Integer