Retrieving the local username

Started by Andy Flowers, March 21, 2009, 06:33:36 PM

Previous topic - Next topic

Andy Flowers

I am trying to intergrate my application with the windows security. Does anyone know how to retrieve the username of the current user logged on?

Andy

TechSupport


#Compile Exe


#Include "win32api.inc"


Function PBMain() As Long

   Local zUserName As Asciiz * %MAX_PATH
   
   GetUserName zUserName, %MAX_PATH
   
   MsgBox zUserName
   
End Function



Andy Flowers