ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[¤À¨É] ¨ú±o¥Ø«eµn¤JWindowsªºUser

[¤À¨É] ¨ú±o¥Ø«eµn¤JWindowsªºUser

Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Sub Get_User_Name()
    Dim lpBuff As String * 25
    Dim ret As Long, UserName As String
    ret = GetUserName(lpBuff, 25)
    UserName = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1)
    MsgBox UserName
End Sub

        ÀR«ä¦Û¦b : ¤£­nÀH¤ß©Ò±ý¡A­nÀH¤ß±Ð¨|¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD