CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: Spy Program

  1. #1
    Join Date
    May 2007
    Posts
    127

    Spy Program

    Hi! I've just finished learning C++ and I want to make something to impress my familly ("What the hell are you doing all day in front of that **** computer? Get a job!"). So I've decided to make a spy app to do this things:

    1. Access the webcam and record to a file without the user to know (in background).
    2. Acces the microphone and record to a file.

    Maybe if I can do that I can impress them.
    Please, help me! How this 2 task can be acomplished?

    Please forgive me if this is not the right place to post this.

    Bye!

  2. #2
    Join Date
    May 2007
    Posts
    811

    Re: Spy Program

    I'm glad I'm not your family.

  3. #3
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,607

    Re: Spy Program

    I've just finished learning C++
    Lucky you. I'm still learning it...
    Best regards,
    Igor

  4. #4
    Join Date
    Aug 1999
    Location
    <Classified>
    Posts
    6,882

    Re: Spy Program

    Do you know anything about Win32/MFC programming ?
    Regards,
    Ramkrishna Pawar

  5. #5
    Join Date
    May 2007
    Posts
    127
    Yes, I know Win32/MFC programming.

  6. #6
    Join Date
    Aug 2007
    Location
    Birmingham, UK
    Posts
    360

    Re: Spy Program

    I would recommend to start by making a simple program that just does the second bit - record from a microphone and store the audio in a file. When you've covered that successfully then make another application that just records the video to a file.
    Then you can make a third program that includes the functionality of these previous two applications together with any other things you think you may need for your program.

    There are several methods in capturing media on Windows, but you may want to look into the MCI interface on www.msdn.com.

  7. #7
    Join Date
    Aug 1999
    Location
    <Classified>
    Posts
    6,882

    Re: Spy Program

    Quote Originally Posted by Chirieac
    Yes, I know Win32/MFC programming.
    Then it's time to learn how to program WebCam/DigiCams using WIA,

    msdn2.microsoft.com/en-us/library/ms629863(VS.85).aspx
    Regards,
    Ramkrishna Pawar

  8. #8
    Join Date
    May 2007
    Posts
    127
    Thank for your replys.

    But what about video for windows with the AVICap window class (http://msdn2.microsoft.com/en-us/lib...7(VS.85).aspx).

    Or what about MCI interface that Edders talk.

    I want to use something that all the webcams will work (if that is possible).

  9. #9
    Join Date
    May 2007
    Posts
    127
    "The WIA API is designed for use by C/C++ programmers. Familiarity with the Windows graphical user interface (GUI) and Component Object Model (COM) interfaces is required."

    Do you know some books or maybe some good tutorials to learn something about COM? Just to allow me to use WIA API.

    MCI is using COM too?

  10. #10
    Join Date
    Aug 1999
    Location
    <Classified>
    Posts
    6,882

    Re: Spy Program

    There are several ways like AVICap, it's upto you, I would say go through all possible techniques and see whats best for you.

    I don't remember any book on topic but there are a lot of resource on internet.
    Regards,
    Ramkrishna Pawar

  11. #11
    Join Date
    May 2007
    Posts
    127
    Thanks Krishnaa for your quick reply!

    But what is the best way?

    Maybe, after I do this 2 tasks (to capture the webcam and microphone) I will start to learn something about the internet programming. So I can practice the internet programming by making somekind of conference app:
    an app to be able to send text messages, see the web of my friend, listen to him.

    So I don't want to get in trouble then that my app is not working with his webcam, microphone. That's why I ask which is the best way (of course every way with his pros and cons).

  12. #12
    Join Date
    Aug 1999
    Location
    <Classified>
    Posts
    6,882

    Re: Spy Program

    The best would be the one which goes easy for you, I haven't done a lot of video programming so I can't suggest you the best of my knowledge, but I believe WIA would do a good job, I have seen a lot of programs developed using that.
    Regards,
    Ramkrishna Pawar

  13. #13
    Join Date
    May 2007
    Posts
    127
    Thanks Krishnaa, I will look at WIA.

    I've found two methods to use the webcam:

    1. Using WIA SDK
    2. Using "avicap32.dll"

    The second method is a bit harder then the first.

    What I'm interesting is what will support more types of webcams (I'm afraid that maybe some older webcams will not work with WIA).
    Last edited by Chirieac; April 3rd, 2008 at 08:33 AM.

  14. #14
    Join Date
    May 2007
    Posts
    127
    I've found this: "WIA supports <TakePicture> but that operation isn't fast enough to get more than a few frames a second." here: http://www.hanselman.com/blog/Captur...tPossible.aspx

    I don't mind if I save every frames separately like a jpeg.
    What I want is to capture how many frames I can with speed (if I want to make later a conference internet app - so I need to capture and send the data fast, right?) and my app be compatible with every webcam (or almost).

    Bye!

  15. #15
    Join Date
    May 2007
    Posts
    127
    Thanks for your replys!

    With this lines of code AVICap saves the data from a webcam tu a CAPTURE.AVI automaticly:

    HWND hWndC = capCreateCaptureWindow (L"My Own Capture Window",
    WS_CHILD | WS_VISIBLE , 0, 0, 640, 480, m_hCap, 0);

    capDriverConnect (hWndC, 0);
    capPreview(hWndC, true);

    capCaptureSequence (hWndC);


    So I think AVICap is the to go.

    Bye!
    Last edited by Chirieac; April 3rd, 2008 at 07:49 PM.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)