Can I get information about vga and monitor connect status? - glfw

I'd like to get Monitor-VGA (multiple monitor and multiple vga) connection's information. Can I get that information with GLFW api or other way?
I can get monitor information with glfw api. However I cannot find about graphic device and monitor's connecting status.
Can I get the status (which monitor is connected vga no.1 and which monitor is connected to vga no.2?)?

Related

spy with LibCEC on Raspberry pi

I'm trying to use LibCEC for listen HDMI-CEC devices on my local network.
I want to obtain all CEC information from all devices.
Actually LibCEC give me information about broadcasting and direct messages to my raspberry pi, but not about direct messages between other devices (for example between my TV and my ps4).
I want to undo this limitation, to be able to spy every messages on the network.
I looked for the filter in LibCEC, but i didn't find where it was filtered.
Does someone tried to create a CEC listener or has any idea of where is locate this filter?

Trigger an exe once My device is connected via USB

Once my embedded device is connected to USB port of my PC, it should trigger an exe as an event. How can I achieve this??
Should I create a service to keep monitoring the USB connector bus or is there any default API's available in Windows to achieve this??
thanks.
A simple exe which is started on connect is not possible. But you can write a service or user mode application which listens for device arrival events. WM_DEVICECHANGE is sent to all (registered) applications with a device interface guid which represents which device is plugged in. You can then use this id with the setupapi to see if its your device.
On receiving that event, you can then start your executable.
Depending on your version of Windows it might be possible with a workaround using a AutoRun.inf file in the root folder of a USB drive. For security reasons this is by default turned off, and in Windows 7 not allowed at all.
To achieve the same effect in a more robust way, you need to create a service that monitors whether your device is connected or not (e.g. iTunesHelper that monitors for connected Apple devices).
The easiest solution is probably a trivial UMDF driver. That's basically a small COM component called when your device is connected.

Detecting FireWire cable event within MFC C++?

I'm trying to detect the event when a FireWire cable is plugged into the FireWire port of the PC withing MFC C++ app. I would also like to trigger this even myself as the FireWire connections drops and never is rediscovered withing unplugging the cable and plugging it back in.
Anyone have any experience trying to programmaticaly simulate a unplug-replug event?
You can register yourself to receive device arrival messages. See the help for RegisterDeviceNotification to find an example on how to register yourself.
You can trigger a bus reset notification on the firewire bus, but I don't know if you can do this from user mode, without the help of a kernel mode module.

how to determine keyboard disconnected in DirectInput

I am monitoring HID connections using EnumDevices(..., DIEDFL_ATTACHEDONLY). When I disconnect a game controller it no longer shows up in the callback. However, when I disconnect the keyboard, it still shows up in EnumDevices.
I've looked through the API, but I don't see where else to query if a device is connected.
What about http://msdn.microsoft.com/en-us/library/windows/desktop/aa363432%28v=vs.85%29.aspx
You can subscribe to any device notifications like attach,detach,etc...

Microphone plug in event/ Mic attach event Vista

I want to be notified when a microphone jack is plugged in. What is the event fired by the OS(particularly Vista)
The audio panel shows no recording device active if no mic plugged in(vista). This never happened in XP.
Also if my microphone had a "advance control" for eg Bass Boost, Mic Boost(AGC) etc, how can I get the mixer control for the same to control it.
I'm using MFC for development.
Thanks
I believe that you want to implement IMMNotificationClient and handle the OnDeviceAdded event.
If you want the various controls in Vista, you're better off using the Device Topology API to get the controls (IAudioLoudness, etc.) Otherwise, you need to enumerate the mixer device IDs & ask them for their endpoint IDs, then compare the endpoint ID to find the real device you're interested in.