| | |
How to get mac address with input ip address
Thread Solved |
use this api function estella :
vb Syntax (Toggle Plain Text)
Private Declare Function inet_addr Lib "wsock32.dll" (ByVal s As String) As Long Private Declare Function SendARP Lib "iphlpapi.dll" (ByVal DestIp As Long, ByVal ScrIP As Long, pMacAddr As Long, PhyAddrLen As Long) As Long Private Declare Sub CopyMemory Lib "kernel32.dll" Alias "RtlMoveMemory" (dst As Any, src As Any, ByVal bcount As Long)
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
Try This following Code :
Actually this code can use as hacking tool, so use this code carefully friend.
It seems like this pic :
MAC Address.bmp
vb Syntax (Toggle Plain Text)
Option Explicit Private Const No_ERROR = 0 Private Declare Function inet_addr Lib "wsock32.dll" (ByVal s As String) As Long Private Declare Function SendARP Lib "iphlpapi.dll" (ByVal DestIp As Long, ByVal ScrIP As Long, pMacAddr As Long, PhyAddrLen As Long) As Long Private Declare Sub CopyMemory Lib "kernel32.dll" Alias "RtlMoveMemory" (dst As Any, src As Any, ByVal bcount As Long) Private Function GetRemoteMACAddress(ByVal sRemoteIP As String, sRemoteMacAddress As String) As Boolean Dim dwRemoteIp As Long Dim pMacAddr As Long Dim bpMacAddr() As Byte Dim PhyAddrLen As Long Dim cnt As Long Dim tmp As String dwRemoteIp = inet_addr(sRemoteIP) If dwRemoteIp <> 0 Then PhyAddrLen = 6 If SendARP(dwRemoteIp, 0&, pMacAddr, PhyAddrLen) = No_ERROR Then If pMacAddr <> 0 And PhyAddrLen <> 0 Then ReDim bpMacAddr(0 To PhyAddrLen - 1) CopyMemory bpMacAddr(0), pMacAddr, ByVal PhyAddrLen For cnt = 0 To PhyAddrLen - 1 If bpMacAddr(cnt) = 0 Then tmp = tmp & "00-" Else tmp = tmp & Hex$(bpMacAddr(cnt)) & "-" End If Next If Len(tmp) > 0 Then sRemoteMacAddress = Left$(tmp, Len(tmp) - 1) GetRemoteMACAddress = True End If Exit Function Else GetRemoteMACAddress = False End If Else GetRemoteMACAddress = False End If Else GetRemoteMACAddress = False End If End Function Private Sub btnGetMac_Click() Dim sRemoteMacAddress As String If Len(txtIpAddress.Text) > 0 Then If GetRemoteMACAddress(txtIpAddress.Text, sRemoteMacAddress) Then lblMacAddress.Caption = sRemoteMacAddress Else lblMacAddress.Caption = "(SendARP call failed)" End If End If End Sub
It seems like this pic :
MAC Address.bmp
Last edited by Jx_Man; Feb 8th, 2008 at 11:08 pm. Reason: Pic attach
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
you're welcome.
happy coding and once again careful with the code.
happy coding and once again careful with the code.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
•
•
Join Date: May 2009
Posts: 1
Reputation:
Solved Threads: 0
Get MAC and IP addresses into your C# or any .NET programs by this DLL (download from this Link)
http://www.fileupyours.com/view/2466...ress%20DLL.zip
The program module DLL in this link is written in C# to provide the programmer the easiest method to find the MAC and the IP addresses of the PC, laptop or server. Download the ZIP file and extract DLL (6 Kb) and the PDF explaining how to add this DLL into your program. You dont have to define any field or any program module in your development environment. Just add the DLL file into the references in Visual Studio Solution Browser. Read the PDF file, everything is explained there, so easy, just few lines and all the network adapter MAC and IP addresses are in your program.
By Omer IRKAD omer.irkad@hotmail.com
Get MAC and IP addresses into your C# or any .NET programs by this DLL (download from this Link)
http://www.fileupyours.com/view/2466...ress%20DLL.zip
http://www.fileupyours.com/view/2466...ress%20DLL.zip
The program module DLL in this link is written in C# to provide the programmer the easiest method to find the MAC and the IP addresses of the PC, laptop or server. Download the ZIP file and extract DLL (6 Kb) and the PDF explaining how to add this DLL into your program. You dont have to define any field or any program module in your development environment. Just add the DLL file into the references in Visual Studio Solution Browser. Read the PDF file, everything is explained there, so easy, just few lines and all the network adapter MAC and IP addresses are in your program.
By Omer IRKAD omer.irkad@hotmail.com
Get MAC and IP addresses into your C# or any .NET programs by this DLL (download from this Link)
http://www.fileupyours.com/view/2466...ress%20DLL.zip
![]() |
Similar Threads
- Dreamweaver email forms (ColdFusion)
- memory management in wndows 2000 (Windows NT / 2000 / XP)
- Rebuilding my Wireless Network (Network Security)
- mac vs windows; help to resolve the problem (HTML and CSS)
- am I being thick? (Networking Hardware Configuration)
- Mac 9.1 Msn Hotmail (OS 7 / 8 / 9)
- Configuring mac's built-in firewall (Darwin, X11 and BSD)
- For Kali2005: HackTool.Rootkit - Help Needed (Viruses, Spyware and other Nasties)
- Technology Fallout: Speed of Technology (Troubleshooting Dead Machines)
- ICS With Wireless Routers (Networking Hardware Configuration)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: sort data in ms access querie
- Next Thread: Refresh MS Treeview
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






