?
Solved

Login and out from Windows NT Server

Posted on 1999-12-11
7
Medium Priority
?
132 Views
Last Modified: 2010-08-05
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?

0
Comment
Question by:hongsikchoi
7 Comments
 
LVL 17

Accepted Solution

by:
inthe earned 800 total points
ID: 2274551
i can send you some components
(just leave your mail address) to do this ,i dunno where i got them but they are free and come with source if you just want to use a couple of the functions instead of installing them all.(contains about 15-20 nt comps all in seperate units)
Regards Barry

0
 
LVL 17

Expert Comment

by:inthe
ID: 2274553
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
0
 
LVL 2

Expert Comment

by:brainware
ID: 2274846
inthe, Please send my way too.
brainware@cyberjunkie.dk
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
LVL 20

Expert Comment

by:Madshi
ID: 2274930
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.
0
 
LVL 17

Expert Comment

by:inthe
ID: 2275320
ok i send you too also .. Mad - shi (t)
;-)) Lol
0
 

Author Comment

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

I will give you the points after them.

Thank you.
0
 
LVL 17

Expert Comment

by:inthe
ID: 2278162
Hi
i have just sent them
hope they are ok.
Regards Barry
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This is an update to some code that someone else posted on Experts Exchange. It is an alternate approach, I think a little easier to use, & makes sure that things like the Task Bar will update.
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Planning to migrate your EDB file(s) to a new or an existing Outlook PST file? This video will guide you how to convert EDB file(s) to PST. Besides this, it also describes, how one can easily search any item(s) from multiple folders or mailboxes…
Suggested Courses

588 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question