使用 IOService 端口引用关闭设备
这个问题与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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您知道如何关闭该设备,那么我确信您可以向其发送该命令,但是没有普遍理解的“关闭”消息可以在可能位于另一端的每个可以想象的端点上工作那个端口,如果这就是你所要求的。
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.
这是不可能的,除非设备本身实现用户客户端调用来将其关闭。如果您可以修改驱动程序,您也许可以添加这样的调用,但这取决于您要关闭的特定硬件。
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.