Yo utilizo esto para comprobar el logeo en win
using System.Runtime.InteropServices
using System.Security.Principal
using System.Windows.Forms
using System
namespace Entradawindow
public class loge
[DllImport("Advapi32.Dll")
static extern bool LogonUser
string sUserName
string sDomain
string sUserPassword
uint dwLogonType
uint dwLogonProvider
out System.IntPtr token)
[DllImport("Kernel32.Dll")
static extern void CloseHandle(System.IntPtr token)
public int loging(string nombre, string passw
System.IntPtr pToken
if (LogonUser(nombre, string.Empty, passw, 2, 0, out pToken)
return 1
els
return 0;
Y me va bastante bien :
Saludos
fnunez
Ver este tema:
http://www.softwaremix.net/viewtopic-529193.htm
Enviado desde
http://www.softwaremix.net
Leer las respuestas