|
Question : Can I query our DHCP server to find out whose computer has which ip address ???
|
|
Hi,
I need to be able to quere the network (DHCP?) server to be able to resolve ip address (even mac addresses) into computer name.
I looked around in msdn and found nothing... Yet there two dll in system32 who looks promising: dhcpcsvc.dll and dhcpsapi.dll (client and server api???)
In it there is such call ad DHCPGetClientinfo... Interesting but I haven't been able to find and documentation on there api... And importing them into VC98 does not work :(
Anyone out there has a hint as to how I can do this??? Basicaly I have a set of MAC addresses, which I turn into IP addresses and I need to have pc computer name... GetHostByAddr does not seems to work on out WINNT network??? At least, it does NOT revolve even the computer I am using!!!
Any hints will be appreciated.
thanks.
|
Answer : Can I query our DHCP server to find out whose computer has which ip address ???
|
|
Aquila,if you really need to do this from your application there is a quick simple way,but it is kind of cheesy:
You can have your app write a temp batch file to redirect the results of the nbtstat command into a temp file,then have your app execute the batch file and delete it.You can then open the temp file and load the data into strings or variables for your program.
Im sure there is a much better solution,but if you need this right away the above should only take a few minutes to write.
|
|
|
|