PowerBuilder Function Get UserName Computer gf_get_user_name
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Function Name : gf_get_user_name // Argument Name : (None) // Return Type : String /////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Local External Functions : // Function Long GetUserName (ref String lpBuffer, Long nSize) Library "advapi32.dll" Alias For "GetUserNameA" /////////////////////////////////////////////////////////////////////////////////////////////////////////////// String ls_login_name String ls_temp ULong lul_value Boolean lb_rc lul_value = 255 ls_temp = Space (255) lb_rc = GetUserName(ls_temp, lul_value) ls_login_name = Trim(ls_temp) Return ls_login_name |
Good Luck!