Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 07-25-2001, 08:19 AM
phear phear is offline
Senior Member
Join Date: Mar 2001
Posts: 325
Default Getting the current domain name

Hi all.
How can I get the current domain name (or workgroupname) of the user actually logged in ? I found out the way to get the user's login but not the domain name :

Windows, (....)

function UserName:string;
Buffer : array[0..255] of char;
BufferSize : DWORD;
BufferSize := sizeOf(Buffer);
GetUserName(@buffer, BufferSize);
Result := Buffer;

Please don't give me a component, i don't want any. I'm sur there is a Delphi code out there that does it.

thanks in advance.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT. The time now is 05:11 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.