Jump to content

yordysv

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by yordysv

  1. Hello everyone,

     

    I created an application in which i have to get the user connected to machine (client side) in order to log on the user to the applicacion, but instead it is returning the User of the Server.

     

    This is the function that i am using to get the user connected.

     

    function GetCurrentUserName : String;
    var
      dwI : DWord;
    begin
      dwI := 1024;
      SetLength (Result, dwI + 1);
       if GetUserName(PChar(Result), dwI)then
          SetLength (Result, dwI-1)
       else
          SetLength (Result, 0);
    end;

     

     

    I'd really appreciate your help.

     

    Kind Regards

     

    Yordys Valenzuela 

×
×
  • Create New...