 |
|
|
 |
|
 |
Hi, this utility is exactly what iam looking for. Unfortunately when I try to run HostNIPAddr.exe I get the error message. The error is in Slovak language, so that I dont put it here. I run WinXP SP2.
What can I do to make it run?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
hi, i want to get all WorkGroup names Available in my Lan.
how i do this.
I used some Coding.but not well.
So i need Solution For this.
thanks & Regards, Gowri.g
|
| Sign In·View Thread·PermaLink | 1.33/5 (3 votes) |
|
|
|
 |
|
 |
Hi!
In my application i used this code to find all systems connected in LAN.But it return some systems only. this is the code
Dim childEntry As DirectoryEntry Dim ParentEntry As New DirectoryEntry() Try ParentEntry.Path = "WinNT:" For Each childEntry In ParentEntry.Children Dim newNode As New TreeNode(childEntry.Name) Select Case childEntry.SchemaClassName Case "Domain" Dim ParentDomain As New TreeNode(childEntry.Name) TreeView1.Nodes.AddRange(New TreeNode() {ParentDomain}) Dim SubChildEntry As DirectoryEntry Dim SubParentEntry As New DirectoryEntry() SubParentEntry.Path = "WinNT://" & childEntry.Name For Each SubChildEntry In SubParentEntry.Children Dim newNode1 As New TreeNode(SubChildEntry.Name) Select Case SubChildEntry.SchemaClassName Case "Computer" ParentDomain.Nodes.Add(newNode1) End Select Next End Select Next Catch Excep As Exception MsgBox("Error While Reading Directories") Finally ParentEntry = Nothing End Try
In that the SubChildEntry.SchemaClassName its return value like "Schema" instead of "Computers".For this i'm not able to list out all systems in my LAN.
Can you give solution for this .plz
Regards, Anand.M
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
sorry my english.
this exmple it's amazing but no working in other range IP.
for example: 10.2.1.1 , 10.2.1.56 , etc mac ok
but 64.233.169.99 no mac: 00:00:00:00 why?
please helpme. this is very important.
im create a function just mac for an IP, the code is succesfull.
using System; using System.Collections; using System.Runtime.InteropServices;
public class MAC { [DllImport("iphlpapi.dll", ExactSpelling = true)] private static extern int SendARP(int DestIP, int SrcIP, [Out] byte[] pMacAddr, ref int PhyAddrLen);
public string getmac(string ip) { System.Net.IPAddress TempAD = System.Net.IPAddress.Parse(ip);
byte[] ab = new byte[6]; int len = ab.Length;
// This Function Used to Get The Physical Address int r = SendARP((int)TempAD.Address, 0, ab, ref len); string mac = BitConverter.ToString(ab, 0, 6); //msgbox(mac); return mac; } }
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
Thank you for the code example.
However, you should try harder to use more english-like variable names instead of acronyms. (This helps people understand it easier).
for example, you use: byte[] ab = new byte[6];
you should use: byte[] macAddressBytes = new byte[6];
Don't be so lazy when you code, it makes it really hard to understand (as well as maintain) your code later on.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
I have error in programming! so I need your asistance. desciption: <img scr="http://aycu20.webshots.com/image/16019/2005784138176631572_rs.jpg">
QuangLam
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I have been trying to solve on how to detect IP addresses based on my installed printer drivers around my network but I am getting frustrated each day..heheh.. Win32_Printer, Win32_NetworkAdapter and Win32_TCPIPPrinter failed to get the information that I want..
if you're kind enough share your knowledge to email it to me at janverge@gmail.com
I am using C# as well.
nice one..
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
If we invoke a function of Windows, so in other OSs we cannot get MAC. How can we get MAC address of other OSs (Linux, Solaris...)? Is there any method that is transparent with the operating system? Thanks.
Minh
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi,
I did this Application in Dotnet. I don't think there is the support aviable for all these OS in Dotnet.
Thanks, Mahendran.G
Mahendran. G Sr. Software Engg. Satyam computer Services, Chennai, India.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Hi Minh,
You clearly mentioned that, You are going to working in the local network, fine then. It should be in the Server side function. In Server side you can get the IP address of the Client which requesting web page (i know it is possible in Dotnet). For the IP address you can get the MAC using the Any Server Functions (if it is a windows server this functions also will work).
Regards, Mahendran.G
Mahendran. G Sr. Software Engg. Satyam computer Services, Chennai, India.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi Mr. MahendranG,
do u know how to get the MAC Address from the NIC Hardware not from a place that can be changed.
May god give u good health and knowledge.
|
| Sign In·View Thread·PermaLink | 2.60/5 (4 votes) |
|
|
|
 |
|
 |
i notice that you are querying for hostname or machine name first(active directory, domainentry, etc) and then getting the IP Address of each machine.
I wanted to know if you can do the other way around.
For one of my projects i tried using
Dns.GetHostEntry(IPAddress)
this gave me back the IpAddress as hostname in the IPpHostEntry variable and not the actual machine name.
plz help!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
If You r able to Get the Ipadrress, you can resolve the ipaddress with the hos name. If You get the IP Address, Please try to check the syntax and convert it into the Hostname using the resole Method.
Very long back i invest time for this. So i am not able to give exact solution for this. Sorry
Mahendran. G Sr. Software Engg. Trnasact Solution, Chennai
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
thanx 4 the reply...
anyways... the above problem turns out to be a microsoft bug in the windows Xp, which they will fix in windows vista... found that after racking my brains for a long time on this!!
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=97815
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
I have tried you code and it really good in a LAN. But when I use SendARP to recieve MAC address of an IP from internet, it doesn't work.
The returing MAC Address always be 00-00-00-00-00-00 I wonder that, does SendARP work only in a local netowrk? In this case, do you know any solution for my problem?
Thanks for your help!
dathq
|
| Sign In·View Thread·PermaLink | 1.50/5 (7 votes) |
|
|
|
 |
|
 |
Hi,
Currently this does not retrieve the MAC Address of PC's that are turned off, could this be retrieved?
Thanks
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
KevinReece,
I think it is not possible, How you get information form the person who's already died. This is not avialable in the servers also.
Mahendran. G Sr. Software Engg. Trnasact Solution, Chennai
|
| Sign In·View Thread·PermaLink | 3.50/5 (2 votes) |
|
|
|
 |
|
 |
Hello,
This is a really nice project! Is there a VB.NET 2005 example so that I can work with it? I'm not any good on C#. :(
|
| Sign In·View Thread·PermaLink | 2.00/5 (3 votes) |
|
|
|
 |
|
 |
hi,
i didn't started with 2005 Examples, I will post it as early as possible
Mahendran. G Sr. Software Engg. Transact Solution pvt Ltd, Chennai
-- modified at 23:14 Monday 10th April, 2006
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
 |
A mi me compiló así, aun keda pendiente el tema del IpAddress Obsoleto :s.
IPHostEntry IP = Dns.GetHostEntry(Mac); MessageBox.Show(IP.AddressList[0].ToString()); string strIp= "", maca="";
foreach(IPAddress TempA in IP.AddressList) { strIp = TempA.Address.ToString(); byte[] ab = new byte[6]; int len = ab.Length; int r = SendARP( (int) TempA.Address, 0, ab, ref len ); maca = BitConverter.ToString( ab, 0, 6 ); MessageBox.Show(maca);}
|
| Sign In·View Thread·PermaLink | 1.50/5 (3 votes) |
|
|
|
 |
|
 |
sendARP does not let you to resolve the mac address from a hostname on another subnet.
I had to manage that with running a process nbtstat -a or nbtstat -A
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
excellent but you do hard coding the workgroup name such as 'Baba' in your case. how can i do programatically the same i.e. I want to retrieve the workgroup name programatically. please if you know then inform me. thaks a lot rizwan
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |