MS Lifecam API/ Webcam Button
I have a Microsoft Lifecam Cinema webcam. I'm using directshow to get a feed and take pictures from the camera, however I want to use the button on top of the camera as a capture button.
Is there any way at all I could access this button using dire开发者_高级运维ctshow? The camera also comes with an API, but I don't really know how to use it, and its undocumented. Perhaps somewhere among the methods is something that allows me code against the button?
I think the API you are refereing to is actually just the DLLs that the LifeCam software uses as its back end. It is not supported by Microsoft and it not really designed to be used outside the LifeCam application.
When the button is pressed though, the drivers run the application refered to in the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\0002\Settings\QuickStartPath
What you can do, though it is a bit of a hack, is create a simple executable that sends a windows message when it is run. Then you set the registry setting to point at the executable. Finally all the applications that need to know when the button is pressed simply respond to your windows message in their WndProc.
I'd include the API in your project, then take a look through it, see if you can find any relevant goodies. Alternate options include a hotkey or small button on your UI?
精彩评论