# File lib/chef/util/windows/net_user.rb, line 120
  def validate_credentials(passwd)
    token = 0.chr * PTR_SIZE
    res = LogonUser.call(@username, nil, passwd,
                         LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, token)
    if res == 0
      return false
    end
    ::Windows::Handle::CloseHandle.call(token.unpack('L')[0])
    return true
  end