Firewire communication

Hi guys,

   I am trying to interact with a camera through firewire. I wrote a
code based on the example given in MSDN.  When I execute the code it
always return the value 1 no matter whether the device is connected or
disconnected. Please let me know what went wrong, i couldnt figure out
the problem so for.

My code is as follows.
--------------------------------------

void CFireDlg::OnDeviceNotify()
{
	// TODO: Add your control notification handler code here
   CString cs;

   bool bDevInterResult=FALSE;
   HDEVNOTIFY *hdn=NULL;

   bDevInterResult = DoRegisterDeviceInterface(GUID_MP1394MI,hdn)!=0;
   cs.Format("Device notification : %d",bDevInterResult);
   MessageBox(cs);

}


BOOL CFireDlg::DoRegisterDeviceInterface(GUID InterfaceClassGuid,
HDEVNOTIFY *hDevNotify)
{
    DEV_BROADCAST_DEVICEINTERFACE NotificationFilter;
    char szMsg[80];

    ZeroMemory( &NotificationFilter, sizeof(NotificationFilter) );
    NotificationFilter.dbcc_size =
sizeof(DEV_BROADCAST_DEVICEINTERFACE);
    NotificationFilter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
    NotificationFilter.dbcc_classguid = InterfaceClassGuid;

    hDevNotify = (void **)RegisterDeviceNotification(GetSafeHwnd(),
&NotificationFilter, DEVICE_NOTIFY_WINDOW_HANDLE);

    if(!*hDevNotify)
    {
        wsprintf(szMsg, "RegisterDeviceNotification failed: %d\n",
                GetLastError());
        MessageBox((const char*)GetSafeHwnd(),szMsg, MB_OK);
        return FALSE;
    }

    return TRUE;
}

--------------------------------------

0
1/24/2006 3:50:16 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
507 Views

Similar Articles

[PageSpeed] 30

Reply:

Similar Artilces:

Intrasite Communications
Our Exchange system currently consists of a single back-end Exchange 2003 server (MAIL2) and a single front-end Exchange 2003 server (MAILFE1). All of the mailboxes and public folders are located on MAIL2 with none on FE1. Typically FE1 does not house a Public Folder Store though I have temporarily created one during my troubleshooting. MAIL2 has an SMTP connector attached to it so that all outbound (internet) mail can be routed through our Mailsweeper/gateway machine. I am now at the stage of trying to add a second backend server (MAIL1) to share the load a bit. I have installed it...

Inter-driver communication
I have 2 drivers, and want one driver to communicate with another driver. How can I achieve that? For example, I have 2 drivers: Driver1 and Driver2. The purposes of Driver1 is to allocate non-paged memory which it uses for reading/writing purposes. Driver2 would like to read from the same memory address created by Driver1 previously. Driver2 can do that only after know from Driver1 the address of non-paged memory. How that can be achieved? Few assumptions 1) Driver1 is loaded before Driver2 2) Driver1 and Driver2 has to work separately. 3) Only Driver1 can alloca...

Bug: Office Notifications Uses Data from Firewire Disk after restart
Today, I restarted my powerbook. I had a Firewire drive connected. This Firewire drive has two partitions. One partition is a bootable system backup for this powerbook. Upon login, Office Notifications started giving me reminders which I had "completed" weeks ago. I then looked at my email and found 3-week old emails at the top of my in-box. After realizing that it was apparently using the database from the bootable system backup, I tried to eject the Firewire disk but the Finder told me that it was "in use". I shut down, disconnected the Firewire drive, then restart...

Sudden Outlook/Exchange Communication Problem
Hi, We've been using Exchange 2003 & Outlook 2003 successfully for about 4 years now. We've never had any real issues, and it=92s been working well. However, for some reason since Friday we've been getting communication problems between Exchange & Outlook. Yesterday I had a user complain that Outlook always opens in 'Work Offline' mode, no matter what mode you set it to be before closing. If you click the connection status menu bar in the bottom right corner of Outlook, you can untick 'Work Offline' and Outlook connects, and sends/receives mail without any...

Need to toggle a bit in Firewire Hub
Hi guys, I am working on creating a trigger , whenever a device disconnects from the firewire hub. Inorder to make the trigger, I need to toggle a bit in the firewire hub chipset . Could anyone pls tell me how to toggle a bit in the firewire hub. I am using a custom made firewire hub with At - Mike I think you need to be in the microsoft.public.development.device.drivers newsgroup rather than in a mfc newsgroup to have someone really help you. -- Vipin Aravind "mike" <meenakshi78@gmail.com> wrote in message news:1138223109.139961.188980@g44g2000cwa.googlegroups.com.....

communication with our website from MFC
Hopefully someone can offer a little guidance here... our project is a stand alone program but I want it to communicate with our website to check for program updates. To avoid major problems with firewalls we are simply requesting an ASP page that checks the date of our latest release and send this back as formatted text. Our program read this text and compares the date/time with the current program to see if the web version is newer. Although this works I am sure it is not a great way of doing this - is there a simpler/better/more elegant way of doing this. Any help offered will be...

Communicator 2007 is missing from Office Professional Plus 2007 DV
I would like to install the Communicator 2007, however, it looks like it is missing from the purchased Office Professional Plus 2007 DVD? According to all the advertisements and product descriptions, the Communicator should be included. Where can I download it? Any help or suggestions would be greatly appreciated. Thanks, Nick Nick From where did you purchase the VL version on DVD of Office 2007 Pro Plus. Can you let us know before we can answer your issue. Thanks -- Peter Please Reply to Newsgroup for the benefit of others Requests for assistance by email can...

Use with Office Communicator saving Conversations (IM)
Our office just upgraded our email, and now we have Office Communicatior available. OC allows the saving of conversations to Outlook. I noticed that when a conversation is closed or saved and returned to after a time delay, there are 2 conversations in the folder. Is there a way to only have 1 conversation in the folder? or to have the seperate conversations be distinct, i.e. convo 1 at 930am and ends at 1015 is one, and another covo starts at 215-225. now i'll have a conversation saved at 1015 that has all im from 930, as well as a convo at 225 that has the 215-225 as we...

ethernet communication
I have a normal windows PC and a 16 bit Single Chip Microcontroller. I would like to have the PC communicate to the microcontroller through ethernet. And i'm an intern for a company and I've never programmed with ethernet so can anyone give me an idea on how to start? I was thinking of server/client with sockets, but is there an easier way. I'm not too familar with C++, only have experience in VB6/VB.NET. Thanks well, the pc can use vb6 or vb.net of course, and you can do socket communications with either of those, including setting up the server side of the link. so the...

Communication problem
I am in the process of becoming a publisher. I have been using MS products for several years and very happy with them. However, since I have purchased a Konica Minolta printer, the communication between them for printing books has disappeared. Is there something I am missing, or is it an impossibility? Please help! Thank you very much! Kathy Which version of Publisher are you using? -- JoAnn Paules MVP Microsoft [Publisher] "Kathy" <anonymous@discussions.microsoft.com> wrote in message news:405b01c49015$01e98290$a601280a@phx.gbl... >I am in the process...

DEATH OF USB & Firewire PORTS, and what USB/Firewire to expect in meanwhile
Current USB standard is increasingly 3.0, not 2.0. Firewire800, not 400; regardless of all else Firewire is always better for Video editing as it adds extra commands taylored for video devices control. For general data USB3 controllers are ALREADY extremely cheap for desktops, even for laptops - the card is $30 to $40 But why do I say it may die? I don't mean it will die in a sense like people thought TV will kill radio. Copper wire is still irreplaceable in many applications, especially cost-sensitive ones. But the new era is coming up and I am excited b/c worked with wor...

Excel communicating to csharp application
In Excel I need some information that the csharp application holds. What would be the best aproach for this problem. Any help is really appreciated. THANKS ...

communication
My client needs to communicate between two computers. Is there anyway they can share calendars without a server. I think I know the answer and its nuts. The work arounds I have tried do not work efficiently. Can someone steer me in the right direction? I need to share calendars and winfax pro files ? Thanks Take a look here, it may help: http://www.slipstick.com/outlook/share.htm --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without r...

Firewire communication
Hi guys, I am trying to interact with a camera through firewire. I wrote a code based on the example given in MSDN. When I execute the code it always return the value 1 no matter whether the device is connected or disconnected. Please let me know what went wrong, i couldnt figure out the problem so for. My code is as follows. -------------------------------------- void CFireDlg::OnDeviceNotify() { // TODO: Add your control notification handler code here CString cs; bool bDevInterResult=FALSE; HDEVNOTIFY *hdn=NULL; bDevInterResult = DoRegisterDeviceInterface(GUID_MP1394MI,...

"The operation failed due to network or other communication problems. Check your connections and try again"
"The operation failed due to network or other communication problems. Check your connections and try again" I'm getting this error message on a number of my computers. It will display part of the screen in the top left corner with this message. When i click ok it continues to open the email without any problems. I had found a solution that requires me to removed some Registry Entrys and then do a Detect and Repair on Microsoft Outlook which hasen't solved the problem. Does anyone have any ideas for me? Windows XP Professional Microsoft Office 2000 w/ SP3 Internet Mail a...

How can you hide the MS Office communicator short cut circle?
How can you hide the MS Office communicator short cut circle? the one which shows up beside contacts with an e-mail address? We don't use Office communicator and wish to hide this. Thanks. ...

How to implement overlapped serial communication in vc++
Hi Everybody , Can you please tell me how we can implement overlapped serial communication in vc++. IF anybody know please tell me , i am waiting for your reply. raghunandan_1081@yahoo.com wrote: > Hi Everybody , Can you please tell me how we can implement overlapped > serial communication in vc++. IF anybody know please tell me , i am > waiting for your reply. > See the sample program named MTTTY in the SDK samples. Also search on that name for an article in MSDN that explains the code. -- Scott McPhillips [VC++ MVP] The MTTTY example is a good prototype. What I do is h...

Modem communications
I have a requirement to communicate using a modem. Please any body help me about Modem Communication in VC++. -- K.Seshu ...

Firewire communication #2
Hi guys, I am trying to interact with a camera through firewire. I wrote a code based on the example given in MSDN. When I execute the code it always return the value 1 no matter whether the device is connected or disconnected. Please let me know what went wrong, i couldnt figure out the problem so for. Advanced Thanks - Mike My code is as follows. -------------------------------------- void CFireDlg::OnDeviceNotify() { // TODO: Add your control notification handler code here CString cs; bool bDevInterResult=FALSE; HDEVNOTIFY *hdn=NULL; bDevInterResult = DoRegisterDevi...

Using Outlook 2007 and Office Communicator
Is it possible to show the person's status, i.e., busy, available, away, etc, just before the From column in the inbox view? This would make live easier. ...

how do i get firewire (ieee 1394) running on virtual anything?
I got a nikon LS-4000 slide scanner with a firewire output. I have a firewire port on my dg45id motherboard with an e8400 processor and 8g of ram. I am running windows 7 ultimate. the only software is for the vista. I am running virtual XP, virtual 2000, virtual 98se. I do have windows ME but I try and stay away from that operating system. I can plug and unplug my firewire connection and I get a beep out of the computer but nothing in device manager shows up. I checked the bios in windows 7 and the firewire is enabled. don't know where to turn to next other than nikon ...

Communications Breakdown with CSocket
The following describes a problem I have been having for the better part of 3 months, for approximately the last month however I have been focused solely on solving it and seem to be no nearer now than a month ago. Any thoughts or suggestions that might lead to a fix would be greatly appreciated. I have to VB based applications on two different PC's, a client and a server which use a pair of OCX's to provide a communication method between the two and which use an overloaded version of the CSocket class. A problem has arisen where communication between the two OCX's will be interr...

using 1394 (firewire) camera with Outlook 2003
I have a firewire camera that my Xp desktop SP1 sees. Howeevr when I click on camera in Outlook 2003, it keeps saying it can not find the USB camera. How do I get the firewire camera to be able to be used by the Microsoft Outlook add on where you can send and recieve video email? ...

USB stich influences FireWire throughput
Hello, I have a strange feature on my HP Compaq 8000. I have a device connected via FireWire. While data is transferred from device to PC, throughput is rather low. This is easy to determine using a FireWire bus analyzer. The analyzer shows a lot of data packets have to be resend/retried. However, when I insert a USB flash drive, my FireWire performance goes up: the analyzer shows no retries any longer. I used several USB sticks and only one had no impact. Using a USB mouse doesn't have influence either. What can be the cause for this? The PC has no specials installed: it&#...

How to communicate between threads?
Hi, there I used "AfxBeginThread()" to run a background working thread, while keeping the displaying thread. Because I got many file names in working thread, I want to show them in the displaying thread. How to get those CStringArray pointer from working thread? Thanks Gary On Tue, 13 Apr 2004 09:31:07 -0700, "Gary" <anonymous@discussions.microsoft.com> wrote: >Hi, there, > >I used "AfxBeginThread()" to run a background working thread, while keeping the displaying thread. Because I got many file names in working thread, I want to show them i...