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

[µo°Ý] MAC ªº¹êÅ鳿¤@§Ç¸¹¦p¦ó¨ú±o ?

¦^´_ 1# Scott090
  1. Sub §ì¥»¾÷ºô¸ô¥d¸¹½X()

  2. Dim IPConfigSet

  3. ' §Q¥ÎWMI(WindowsºÞ²z³W½d)¨ú±oNIC¸ê°T
  4. Set IPConfigSet = GetObject("winmgmts:").ExecQuery _
  5.    ("Select * from Win32_NetworkAdapterConfiguration Where ((IPEnabled = TRUE) And (MacAddress != NULL) And (SettingID != NULL))")

  6. ' ¦CÁ|¬d¸ßµ²ªG (list of NICS)
  7. For Each IPConfig In IPConfigSet
  8.    If Not IsNull(IPConfig.IPAddress) Then
  9.       MsgBox IPConfig.MACAddress
  10.    End If
  11. Next 'IPConfig

  12. End Sub
½Æ»s¥N½X
°Ñ¦Ò http://www.dreamincode.net/forums/topic/35609-ipaddress-resolution-in-vb/
diabo

TOP

        ÀR«ä¦Û¦b : µÊ®ð¼L¤Ú¤£¦n¡A¤ß¦a¦A¦n¤]¤£¯àºâ¬O¦n¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD