- ©«¤l
- 172
- ¥DÃD
- 39
- ºëµØ
- 20
- ¿n¤À
- 177
- ÂI¦W
- 0
- §@·~¨t²Î
- Microsoft Windows XP
- ³nÅ骩¥»
- Microsoft Office 2003
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- °ª¶¯
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2023-3-19
|
Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Sub Get_Computer_Name()
Dim Comp_Name_B As String * 255
Dim Comp_Name As String
GetComputerName Comp_Name_B, Len(Comp_Name_B)
'µM¦Ó¦¹¤@¦r¦ê¸g±`¥H null²Å¸¹§@¬°µ²§À¡A¦]¦¹¡A§Ų́ϥΠChr(0) ¨ç¼Æ¨Ó¨ú±oµ²§À
Comp_Name = Left(Comp_Name_B, InStr(Comp_Name_B, Chr(0)))
'¶È¶Ç¦^¹q¸£¦WºÙ
MsgBox Comp_Name
End Sub |
|