Link to home
Start Free TrialLog in
Avatar of hongsikchoi
hongsikchoi

asked on

Login and out from Windows NT Server

We have Windows NT Server 4.0 as fileserver.

In Delphi, how can I login in out from the server not using the Windows NT Workstation NET USE comand?

How to determine if I have already logged in?

ASKER CERTIFIED SOLUTION
Avatar of inthe
inthe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of inthe
inthe

they have funbctions like this:

function TNTLogon.Logon:Boolean;
begin
     If Not LogonUser(PChar(FUserName),PChar(FDomain),PChar(FPassword),FLogonType,FLogonProvider,FUserToken) Then
     Begin
          FError:=GetLastError;
          Result:=False;
          Exit;
     End;
     Result:=True;
end;

some of the other functions in the first component are:

 function GetTheUserName:String;
    function GetTheDomainName:String;
    function GetThePassword:String;
    function GetTheLogonType:DWORD;
    function GetTheLogonProvider:DWORD;
    function GetTheToken:THandle;
    function GetTheError:DWORD;
    procedure SetTheUserName(TheValue:String);
    procedure SetTheDomainName(TheValue:String);
    procedure SetThePassword(TheValue:String);
    procedure SetTheLogonType(TheValue:DWORD);
    procedure SetTheLogonProvider(TheValue:DWORD);
    procedure SetTheToken(TheValue:THandle);
    procedure SetTheError(TheValue:DWORD);

and just counted there is 40 comps altogether covering  
- Working with the Event Log
- Managing Users and Groups
- Network functionality

Regards Barry
BorgsAssimilate@Aol.Com
inthe, Please send my way too.
brainware@cyberjunkie.dk
Hi Barry,

one question: What does "r.r.y." mean?

I mean, "Ba" from "Barry" means evidently "(B)orgs(A)ssimilate", but what about "rry" from "Barry"?

:-))

Would you mind sending me that stuff, too? Thank you...   :-)

Regards, Madshi.
ok i send you too also .. Mad - shi (t)
;-)) Lol
Avatar of hongsikchoi

ASKER

Please send them to me.
My email address is: hongsikchoi@yahoo.com.

I will give you the points after them.

Thank you.
Hi
i have just sent them
hope they are ok.
Regards Barry