使用 IOService 端口引用关闭设备

发布于 2024-08-07 13:34:47 字数 173 浏览 4 评论 0原文

这个问题与Mac OS X上的IO Kit编程有关。

我有一个IO服务端口参考(io_service_t)。是否有一个 API 可以用来关闭 IOService 端口引用末尾的任何内容?我已经尝试了所有的谷歌搜索,但还没有找到解决方案。

任何帮助将不胜感激。

干杯

This question relates to IO Kit programming on Mac OS X.

I have an IO Service Port reference (io_service_t). Is there an API I can use to make whatever is on the end of that IOService port reference power off? I have tried with all my googling might, but have not found a solution.

Any help would be appreciated.

Cheers

Jan

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

悸初 2024-08-14 13:34:47

如果您知道如何关闭该设备,那么我确信您可以向其发送该命令,但是没有普遍理解的“关闭”消息可以在可能位于另一端的每个可以想象的端点上工作那个端口,如果这就是你所要求的。

If you know how to turn that device off, then I'm sure you can send it that command, but there is no universally understood "turn off" message that's going to work on every conceivable endpoint that could potentially be on the other side of that port if that's what you're asking.

疯狂的代价 2024-08-14 13:34:47

这是不可能的,除非设备本身实现用户客户端调用来将其关闭。如果您可以修改驱动程序,您也许可以添加这样的调用,但这取决于您要关闭的特定硬件。

This is not possible, unless the device itself implements a userclient call to turn it off. If you can modify the driver, you might be able to add such a call, but it would depend on the particular hardware you are turning off.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文