控制 PCMCIA 插槽/卡的电源

发布于 2024-07-17 20:36:10 字数 533 浏览 3 评论 0原文

我目前正在开发一个项目,该项目利用专有的 PCMCIA 无线电卡与某些无线设备进行通信。 我目前有一个后台进程,用于处理从卡读取数据并存储数据以供处理,但我希望能够在应用程序未运行时关闭卡的电源。 我做了一些调查,虽然 WMI 显然在其 WIN32_PCMCIAController 实现中支持 CIM_PCMCIAController 配置文件,但 SetPowerState()Reset() 函数未实现。 有谁知道一种方法(有或没有WMI)来控制插槽的电源状态? 我需要能够以编程方式关闭和打开插槽或卡的电源。

编辑

与我交谈过的一些人建议向该卡添加一项功能以促进此操作。 不幸的是,修改卡以提供此类功能目前确实不是一个选择。

编辑 2

我已确认该设备确实显示在“多功能适配器”类别下的设备管理器中,但从此处禁用该设备或 PCMCIA 控制器本身都不会影响该设备的电源卡片。

I'm currently working on a project that utilizes a proprietary PCMCIA radio card to communicate with some wireless devices. I currently have a background process that handles reading data to and from the card and storing it for processing, but I'd like to be able to shut down power to the card when my application is not running. I've done some investigating, and while WMI evidently does support the CIM_PCMCIAController profile in its WIN32_PCMCIAController implementation, the SetPowerState() and Reset() functions are not implemented. Does anyone know of a way (with or without WMI) to control the power state of the slot? I need to be able to programatically both power off and power on either the slot or the card.

Edit

Several people I've spoken to have suggested adding a function to the card that would facilitate this. Unfortunately modifying the card to provide this sort of functionality really isn't an option right now.

Edit 2

I've confirmed that the device does show up in the Device Manager under the "Multifunction adapters" category, though neither disabling the device nor the PCMCIA controller itself from here has any effect on the power of the card.

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

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

发布评论

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

评论(2

寂寞陪衬 2024-07-24 20:36:11

据推测,该设备有自己的某种驱动程序并显示在设备管理器中。

在这种情况下,您可以通过调用 devcon(相当于设备管理器的命令行)来禁用设备),从你的程序内部。 这将使 Windows 处理关闭设备。

devcon 禁用。 有关如何通过特定设备 ID 关闭设备的示例,请参阅示例#31。

我是否走对了路,或者我误解了你的问题?

Presumably, the device has it's own drivers of some sort and shows-up in Device Manager.

In which case, you could disable the device by calling devcon (Command-line equivalent of Device Manager), from inside your program. This would make windows handle shutting down the device.

devcon disable. See Example #31 for an example of how to shutdown device by a specific device id.

Am I going on the right-lines, or have I misinterpreted your question?

溺渁∝ 2024-07-24 20:36:11

我很好奇,但是使用“安全删除硬件...”按钮关闭设备电源是否足以满足您的要求?

如果可行,您可以通过 Microsoft 的 API 以编程方式注册和取消注册设备。 以下页面显示了可能对这种情况有帮助的几个函数: http://msdn.microsoft.com/en-us/library/aa363234(VS.85).aspx

I'm curious, but does using the "Safely remove hardware..." button turn off the power to the device, enough to satisfy your requirement?

If that works, you could programatically register and unregister the device through Microsoft's API. Here is a page that shows a couple functions that might be helpful for this scenario: http://msdn.microsoft.com/en-us/library/aa363234(VS.85).aspx

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