Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to display the current user name?

Answer Posted / clive

use win32 function getUserName

function MyUserFunction : String;
var
pcUserName : pChar; // temporary storage
dwMaxChars : DWORD; // length parameter
Const
MAXCHARS = 255; // max length
begin

dwMaxChars := MAXCHARS;
pcUserName := strAlloc( MAXCHARS + 1 );
try
If not getUserName( pcUserName, dwMaxChars ) Then
result := ''
else
result := String( pcUserName );
finally
strDispose( pcUserName );
end;

end;

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to Connect to a remote CORBA server?

1793


How to retrieve an InterBase Blob in Delphi using SavetoFile?

1817


Why reusing or inheriting from a Remote Data Module is not a good idea?

1661


How to Use the Application's OnIdle Event?

2409


What is the target load order?

2368


what are the Differences between Create(Self) and Create(Application)?

1771


What is the diff between IT Company & other companies?.

2406


What is a good BDE Alternative?

1965


How to avoid an access violation when using the move procedure?

1805


Explain ODBC Constraints ?

1718


How to change an ISAPI DLL project to a CGI project, or vice-versa?

1736


How to Convert 16bit resource to 32bit?

1918


How to create a bitmap from an icon?

1824


How to Get a handle on your files ?

1769


How to Access Server Methods from Client ?

1633