如何从metro应用程序获取本机C ++中的子网掩码? [英] How to get subnet mask in native C++ from metro app?

查看:80
本文介绍了如何从metro应用程序获取本机C ++中的子网掩码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道如何使用Metro应用程序中的WinRT C ++ API检索NIC的子网掩码? 我有一个metro应用程序,需要确定传入的数据包是来自本地子网还是来自其他网络/互联网。 我查看了所有的Windows.Networking。*
类,但找不到任何提供此类功能的类。

Does anyone know how to retrieve subnet mask for a NIC using WinRT C++ APIs in metro app?  I have a metro application that needs to determine if an incoming packet is from local subnet or from other network/internet.  I went over all the Windows.Networking.* classes, but couldn't find any class that provides such functionality.

谢谢。

推荐答案

您好,

在Metro App中不支持IP Helper功能。因此,我们无法使用GetAdaptersInfo来获取子网掩码。

The IP Helper feature does not support in Metro App. Therefore, we cannot use GetAdaptersInfo to get the subnet mask.

请查看本文档中的"网络"部分。

http://msdn.microsoft.com/en-us/library/windows/desktop/hh464945.aspx

Please check the Networking section in this document.
http://msdn.microsoft.com/en-us/library/windows/desktop/hh464945.aspx

最好的问候,

Jesse

Best regards,
Jesse


这篇关于如何从metro应用程序获取本机C ++中的子网掩码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆