Windows硬件系统函数 - GetUserName
来源:互联网 发布:股票交易大数据 编辑:程序博客网 时间:2024/04/30 12:06
VB声明Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long说明取得当前用户的名字返回值Long,TRUE(非零)表示成功,否则返回零。会设置GetLastError参数表参数类型及说明lpBufferString,一个字串缓冲区,预先初始化成由nSize指定的长度。它将用于容纳用户名nSizeLong,初始化成lpBuffer的长度。返回以后,它会包含载入lpBuffer的字符数量示例
Dim s$, cnt&, dl&
cnt& = 199
s$ = String$(200,0)
dl& = GetUserName(s$, cnt)
Debug.Print Left$(s$, cnt); cnt
- Windows硬件系统函数 - GetUserName
- Windows硬件系统函数 - ExitWindowsEx
- Windows硬件系统函数 - GetAsyncKeyState
- Windows硬件系统函数 - GetComputerName
- Windows硬件系统函数 - GetCursorPos
- Windows硬件系统函数 - GetDoubleClickTime
- Windows硬件系统函数 - GetSysColor
- Windows硬件系统函数 - GetTickCount
- Windows硬件系统函数 - mouse_event
- Windows硬件系统函数 - SetComputerName
- Windows硬件系统函数 - SetCursorPos
- Windows硬件系统函数 - SetDoubleClickTime
- Windows硬件系统函数 - ShowCursor
- GetUserName函数
- GetUserName函数
- Windows硬件系统函数 - ClipCursor, ClipCursorBynum
- Windows API一日一练(72)GetUserName函数
- Windows API一日一练(72)GetUserName函数
- Windows硬件系统函数 - GetSysColor
- print 'welcome to masm!' in the center of the screen.
- Windows硬件系统函数 - GetTickCount
- 【转帖】C# 对txt操作
- 继续调试
- Windows硬件系统函数 - GetUserName
- 【aha, Insight】原来二进制数是这样
- Windows硬件系统函数 - mouse_event
- Windows硬件系统函数 - SetComputerName
- Windows硬件系统函数 - SetCursorPos
- 絮絮叨叨
- Windows硬件系统函数 - SetDoubleClickTime
- Windows硬件系统函数 - ShowCursor
- KMP字符串匹配算法