我希望在我看来这是一项非常简单的任务。 我使用netsh wlan start hostednetwork...在Win7上启动了一个无线托管网络netsh wlan start hostednetwork...一切都很好。 甚至可以与远程设备建立通信。
使用arp -a -v我可以看到IP地址列表,发现我的远程设备的IP地址是192.168.173.xx.
现在,我只想使用C ++ / CLI(.NET 4.5)发现这个地址。 我从未使用过网络,但我不是.NET的初学者。 但是,我找不到任何东西。 我试过的都没有给我答案。 应该有一个简单的方法,不是吗?
我需要的原因是因为远程设备充当服务器所以我需要将我的请求从我的PC发送到该设备的地址......就是这样。
有人知道如何执行此操作?
I want to perform what appears to me as a very simple task. I started a wireless hosted network on Win7 using netsh wlan start hostednetwork... and all was fine. Even the communication could be established with the remote device.
Using arp -a -v I can see the list of IP addresses and found the IP address of my remote device to be 192.168.173.xx.
Now, I just want to discover this address using C++/CLI (.NET 4.5). I never worked with networks but I'm not a beginner with .NET. However, I cannot find anything. All I tried failed to give me the answer. There should be a simple way, no?
The reason why I need that is because the remote device acts as the server so I need to send my requests from my PC to that device's address... That's all.
Someone knows how to perform this operation?
最满意答案
似乎我发现自己是这个问题的解决方案......
GetIpNetTable2()然后扫描此函数返回的表。 请参阅MSDN的此链接 。
它使用Win32函数而不是C ++ / CLI,但它可以混合使用。
It seems that I found myself the solution to this question...
GetIpNetTable2()Then scan the table this function returns. See this link to MSDN.
It uses Win32 functions rather than C++/CLI but it can be mixed.
更多推荐
发布评论