检索通过无线托管网络分配的IP地址(Retrieving IP addresses allocated over a wireless hosted network)

编程入门 行业动态 更新时间:2024-10-24 16:25:47
检索通过无线托管网络分配的IP地址(Retrieving IP addresses allocated over a wireless hosted network)

我希望在我看来这是一项非常简单的任务。 我使用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.

更多推荐

本文发布于:2023-08-07 11:33:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464217.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:分配   地址   网络   IP   Retrieving

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!