qujb
asked on
LogonUser
I use LogonUser in Delphi,why it always return false?
I tried it in Windows NT Workstation, Windows 2000 RC3.
I tried it in Windows NT Workstation, Windows 2000 RC3.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here is an exemple of calling the EnablePrivilege function :
procedure TForm1.FormCreate(Sender: TObject);
var
Error: Integer;
ProcessToken: THandle;
begin
if not OpenProcessToken(GetCurren
begin
Error := GetLastError;
raise exception.create(SysErrorM
end;
if not EnablePrivilege(ProcessTok
Error := GetLastError;
raise exception.create(SysErrorM
end;
CloseHandle(ProcessToken);
end;
as a note see also the gina stuff at madshis site you may be interested in it:
http://nettrash.com/users/madshi/default.htm
Regards Barry