[转帖]PB获得NT用户名
<div style="FONT-SIZE: 13px;">FUNCTION ulong WNetGetUser(ref string lpName,ref string lpUserName,ref ulong lpnLength) LIBRARY "mpr.dll" ALIAS FOR "WNetGetUserA" </div><div style="FONT-SIZE: 13px;"><br/>string ls_name, ls_username <br/>ulong ll_len <br/>ll_len = 256 <br/>ls_username = space(ll_len) <br/>setnull(ls_name) <br/>WNetGetUser(ls_Name,ls_UserName,ll_Len) messagebox("用户名",ls_username)</div>
页:
[1]