Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

NT network - username

Posted on 1998-08-27
4
Medium Priority
?
206 Views
Last Modified: 2010-04-04
Is it possible using Delphi 1 or 2 to get the username of the user currently logged onto Win NT, e.g. using a Windows API function or samething like toat?
0
Comment
Question by:Christian_Wenz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
ronit051397 earned 200 total points
ID: 1337932
var  FUser: array [0..100] of char;
     FLength: integer;
begin
  GetUserName(FUser,fLength);
  Showmessage(strpas(FUser))
end;

0
 
LVL 5

Author Comment

by:Christian_Wenz
ID: 1337933
This works very well on a WinNT network, thanks a lot, but it won't work on a Win95 machine with a network card installed. Any hints for that? (on this machine, there is only one user with no password, so maybe you have to use another routine)
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1337934
Sorry, I don't have 95 on my machine, I tested it only on NT. See:
http://x3.dejanews.com/getdoc.xp?AN=328736452&CONTEXT=904456544.614989851&hitnum=17
0
 
LVL 5

Author Comment

by:Christian_Wenz
ID: 1337935
okay, thanks alot.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

722 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