홈 · 개발 참고자료

개발 참고자료

[파워빌더]GetUserNameA( )

작성자
관리자
작성일
2018-02-13
조회
8153
분류
파워빌더
GetUserNameA( )
This function returns the current users logon name. Be sure to allocate enough space for the string or you'll get a GPF when you exit PowerBuilder. There is no PowerBuilder equivalent.

Global External Function:
FUNCTION boolean GetUserNameA(ref string uname, ref ulong slength) LIBRARY "ADVAPI32.DLL"

Script:
string ls_username
string ls_var
ulong lu_val
boolean rtn
lu_val = 255
ls_username = Space( 255 )
rtn = GetUserNameA(ls_username, lu_val)
Messagebox("GetUserNameA", "Username = " + string(ls_username))