Solved

NT network - username

Posted on 1998-08-27
4
199 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
  • 2
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
ronit051397 earned 50 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now