Yeah. Thanks Stephen.
I'm going to have to have another go at getting D5's Open Help working.  I've got about 10 Help files specified in there but only ever get offered help from a couple of them.
Mark
----- Original Message -----
Sent: Thursday, August 16, 2001 10:31 AM
Subject: RE: [DUG]: Getting the current user

It's in the help (api) - I think I got the original function from a Delphi list - maybe this one.
 
It comes from advapi32.lib where there are other related functions to get SID's etc from which you could obtain the group.
 
regards,
Steve
-----Original Message-----
From: Mark Howard [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 16 August 2001 09:37
To: Multiple recipients of list delphi
Subject: Re: [DUG]: Getting the current user

Stephen
VERY cool! 
Thanks very much.  I had searched for 'username' and didn't come up with this.  Where is it documented?
Mark
----- Original Message -----
Sent: Wednesday, August 15, 2001 6:32 PM
Subject: RE: [DUG]: Getting the current user

function NetworkID: string;
var  buffer : string;
     buffSize : DWORD;
     bRet: boolean;
begin
  buffSize:=128;
  SetLength(buffer,BuffSize);
  bRet := GetUserName(PChar(buffer), buffSize);
  if bRet then
     result := strpas(PChar(buffer))
  else
     Result := '';
end;
-----Original Message-----
From: Mark Howard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 15 August 2001 17:07
To: Multiple recipients of list delphi
Subject: [DUG]: Getting the current user

Hi
 
Can I get the name of the current User from anywhere if I'm just using Paradox?
 
One of my sites wants to restrict access to data depending on particular usernames.
 
Come to think of it, it would be a better long term solution to read the Group that the current user belongs to.
 
Any pointers?
 
Thanks
 
Mark

Reply via email to