?
Solved

Detect FireWire Connection

Posted on 2005-03-21
3
Medium Priority
?
702 Views
Last Modified: 2013-12-03
Hi Experts,

How do i programmatically detect when a camera is connected through the firewire (IEEE1394) cable ??

I'm trying to use SHChangeNotifyRegister, but i am not sure that this is the way to go.

This is to use with MFC, but it could be any language.

Thank you in advance.

BR
Peter
0
Comment
Question by:PeterLarsen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 750 total points
ID: 13598554
I have some code which does this. Since this code is not mine, I can give you only general direction and not actual code. I hope this will help you to find additional information.
You need to handle WM_DEVICECHANGE windows message. If wParam is DBT_DEVICEARRIVAL, cast lParam to PDEV_BROADCAST_HDR and test it's dbch_devicetype member. If it is equal to DBT_DEVTYP_DEVICEINTERFACE (don't ask me what is this, I don't know), handle this case.
To get WM_DEVICECHANGE message you need RegisterDeviceNotification function.
0
 
LVL 2

Author Comment

by:PeterLarsen
ID: 13598894
Ahh, I actually have some code from delphi-jedi.
Thanks for putting me on the right track. It seems right, and the points are probably yours.
I'll get back later today.
0
 
LVL 2

Author Comment

by:PeterLarsen
ID: 13605818
I have found that some computers don't receive DBT_DEVICEARRIVAL upon connection - don't know why.
Anyway, thanks for your help.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question