(Gast)
n/a Beiträge
|
AW: getusername und passwort
24. Okt 2013, 21:51
Ein bisschen Code:
Delphi-Quellcode:
uses
SysUtils,
Windows;
var
hUser : THandle;
res : Boolean;
begin
try
res := LogonUser(LPWSTR('user'),
LPWSTR(nil),
LPWSTR('password'),
LOGON32_LOGON_NETWORK,
LOGON32_PROVIDER_DEFAULT,
hUser);
finally
if hUser>0 then
CloseHandle(hUser);
end;
Writeln(BoolToStr(res, true));
readln;
end.
oder:
Delphi-Quellcode:
ja:= logonuser(pchar(edit1.text),pchar(''),pchar(passwort),
LOGON32_LOGON_NETWORK,LOGON32_PROVIDER_DEFAULT,h);
|
|
Zitat
|