什么是“适配器名称”?
WinAPI 的 GetAdaptersInfo()
填充结构 AdapterInfo
,其中包含名为 AdapterName
的字段。这个字段是什么意思?这有什么意义呢?就我而言,它包含字符串 "{C01E7744-531D-401F-8EA6-D76D3AF35555}"
(包括花括号)。
PS:在 AdapterName
旁边有一个非常清晰的(对我来说)名为 Description
的字段,其值(在我的情况下):
“Realtek RTL8102E/RTL8103E 系列 PCI-E 快速以太网 NIC - VirtualBox 主机接口网络驱动程序微型端口”
让我对 AdapterName 更加困惑。
WinAPI's GetAdaptersInfo()
fills structure AdapterInfo
which has field called AdapterName
. What does this field mean? What's the point in it? In my case it holds string "{C01E7744-531D-401F-8EA6-D76D3AF35555}"
(including curly braces).
P.S.: beside AdapterName
there is pretty clear (for me) field called Description
with value (in my case):
"Realtek RTL8102E/RTL8103E Family PCI-E Fast Ethernet NIC - VirtualBox Host Interface Networking Driver Miniport"
what makes me even more confused with AdapterName
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看起来它只是 Windows 分配给适配器的 GUID,可能作为唯一标识符,您可以在其他一些 API 调用中使用它来专门引用该适配器。例如获取适配器索引。
大多数 IP 帮助器函数似乎都采用适配器索引,但如果您有一个操作网络适配器的应用程序,您可能不希望在应用程序中存储特定适配器的索引,因为添加或删除适配器时索引可能会发生变化。因此,您可以存储适配器的名称,然后在需要时使用 GetAdapterIndex 获取它的索引。
Looks like it's just a GUID that windows assigns to the adapter, probably as a unique identifier that you can use in some other API call to reference that adapter specifically. For example GetAdapterIndex.
Most IP helper functions seem to take an adapter index, but if you had an app that manipulated network adapters, you probably wouldn't want to store the index of a specific adapter in your app as that could change when adapters are added or removed. So you would store the name of the adapter, then use GetAdapterIndex to get the index for it when needed.
它的格式如下,
我不知道它实际上在哪里正式记录,但发现它来源于此处: https://chromium.googlesource.com/external/qemu/+/refs/heads/master/qga/commands-win32.c
Its formatted like so
I have no idea where this is actually documented officially but found it sourced here: https://chromium.googlesource.com/external/qemu/+/refs/heads/master/qga/commands-win32.c
Description
是与AdapterName
关联的用户友好名称。来源:
http://www.delphigroups.info/2/ 8/215347.html
Description
is the user-friendly name associated withAdapterName
.Sources:
http://www.delphigroups.info/2/8/215347.html