我使用 vmware 工作站 6.5-7.0.1 或 vmware player 3.0.0 登录到虚拟机。我在虚拟机内部工作。然后我在虚拟机中按下一个键(例如 Delete-Key,但它应该适用于每个键)。
我想识别在虚拟机外部运行的 C# 应用程序中的“按键事件”。
你能想出任何方法来做到这一点吗?
我使用 vmware 工作站 6.5-7.0.1 或 vmware player 3.0.0 登录到虚拟机。我在虚拟机内部工作。然后我在虚拟机中按下一个键(例如 Delete-Key,但它应该适用于每个键)。
我想识别在虚拟机外部运行的 C# 应用程序中的“按键事件”。
你能想出任何方法来做到这一点吗?
I am not 100% sure if you can actually hook into the VM unless there's an SDK that you can download to intercept it, remember the VMWare is simulating a separate machine, but a logical one alright...The downloads are available here from VMWare.
I can only guess (I use Virtualbox myself), that a Virtual Machine (VMWare/VirtualBox) seizes control of the hooks for the keyboard I would imagine, the host system would not see them...but it would be interesting to try out... I have provided links to CodeProject for keyboard hooks...
Find the one that would suit you in terms of ease-of-use, and try hook in the keyboard, run the VMWare, with your C# application running and see if it picks up any keys within the virtual machine... I would be interested to know...
And oh yeah, +1 from me for good question and welcome to SO! :)
Hope this helps, Best regards, Tom.