C++ 的 API 中缺少 WiFiDirect::Close() 方法

WiFiDirect::Close() method is missing in API for C++

我正在编写一个使用 WiFiDirect 的 C++/CX 程序。目标平台版本为 10.0.10586.0。一切正常,但有一件事。

问题是没有可用的 WiFiDirect::Close() 方法,尽管 documentation 中提到了它。

我得到的实际错误如下: 错误 C2039 'Close': 不是 'Windows::Devices::WiFiDirect::WiFiDirectDevice'

的成员

有人知道我在哪里可以找到它吗?

Close 未计划用于 C++/CX;当调用对象的析构函数时(或当没有更多引用未完成时),它会自动调用。

the docs for IClosable:

Note to callers
Close methods aren't callable through Visual C++ component extensions (C++/CX) on Windows Runtime class instances. Instead, C++/CX code for runtime classes that wants to explicitly clean up a reference should call the destructor or set the last reference to null.