Delphi and Kylix

Moderators: pritaeas
Number of threads: 7244
Number of posts: 19051

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Interupts? using hardware on a USB Posted by TGeekControl on 11 Dec 2005 at 5:41 AM
i wish to play with some hardware, by makeing my own drivers/controll program and allowing me to do things the origanal program was not designed to let me do.

the hardware in question is a Digital camera. i wish to make my program take pictures in succsession so they can be exported and used to create an animated .GIF file.

any help on how to do this will be greatly appreciated.
Report
Re: Interupts? using hardware on a USB Posted by Koppis on 12 Dec 2005 at 11:22 PM
: i wish to play with some hardware, by makeing my own drivers/controll program and allowing me to do things the origanal program was not designed to let me do.
:
: the hardware in question is a Digital camera. i wish to make my program take pictures in succsession so they can be exported and used to create an animated .GIF file.
:
: any help on how to do this will be greatly appreciated.
:
What kind of program you want to create? Is it enough if user can select the directory and the program will create GIF-animation from pictures in that directory? That would be easy to implement if PC has TWAIN drivers installed, the Camera should show as a drive in My Computer.
If you want to create animation without TWAIN drivers and when the camera gets connected, well, that will be more difficult =)
Report
Re: Interupts? using hardware on a USB Posted by TGeekControl on 13 Dec 2005 at 9:38 AM
: : i wish to play with some hardware, by makeing my own drivers/controll program and allowing me to do things the origanal program was not designed to let me do.
: :
: : the hardware in question is a Digital camera. i wish to make my program take pictures in succsession so they can be exported and used to create an animated .GIF file.
: :
: : any help on how to do this will be greatly appreciated.
: :
: What kind of program you want to create? Is it enough if user can select the directory and the program will create GIF-animation from pictures in that directory? That would be easy to implement if PC has TWAIN drivers installed, the Camera should show as a drive in My Computer.
: If you want to create animation without TWAIN drivers and when the camera gets connected, well, that will be more difficult =)
:



the camera isnt recognized as a removable hard-drive, it comes up in the hardware list as "USB still camera". i have heard of using Interupts but i am unsure as to what they are, how they work or how to use them.

i need to access the camera and send a command to it for it to take a picture. i know this is possible as the original program gave this feature but i want to be able to X number of successive pictures and export them for use as an animated .GIF.

Report
Re: Interupts? using hardware on a USB Posted by zibadian on 13 Dec 2005 at 9:50 AM
: : : i wish to play with some hardware, by makeing my own drivers/controll program and allowing me to do things the origanal program was not designed to let me do.
: : :
: : : the hardware in question is a Digital camera. i wish to make my program take pictures in succsession so they can be exported and used to create an animated .GIF file.
: : :
: : : any help on how to do this will be greatly appreciated.
: : :
: : What kind of program you want to create? Is it enough if user can select the directory and the program will create GIF-animation from pictures in that directory? That would be easy to implement if PC has TWAIN drivers installed, the Camera should show as a drive in My Computer.
: : If you want to create animation without TWAIN drivers and when the camera gets connected, well, that will be more difficult =)
: :
:
:
:
: the camera isnt recognized as a removable hard-drive, it comes up in the hardware list as "USB still camera". i have heard of using Interupts but i am unsure as to what they are, how they work or how to use them.
:
: i need to access the camera and send a command to it for it to take a picture. i know this is possible as the original program gave this feature but i want to be able to X number of successive pictures and export them for use as an animated .GIF.
:
:
It will probably be a message sent to the camera driver. Interrupts are used by DOS and are very difficult to implement nowadays, because windows protects them quite well.
A brute force approach would be to write a message hook, which shows you all the messages coming and going to the camera program (be sure to filter refreshes and paints). Then you can see which messages are sent to the camera driver. Once you have them, you can use that in your own program to make photos.
A much more elegant way is to check wether the program exports an interface to control the camera. If it does, then you can import that interface into Delphi and use that to control the camera.
Report
Re: Interupts? using hardware on a USB Posted by TGeekControl on 13 Dec 2005 at 1:51 PM
: : : : i wish to play with some hardware, by makeing my own drivers/controll program and allowing me to do things the origanal program was not designed to let me do.
: : : :
: : : : the hardware in question is a Digital camera. i wish to make my program take pictures in succsession so they can be exported and used to create an animated .GIF file.
: : : :
: : : : any help on how to do this will be greatly appreciated.
: : : :
: : : What kind of program you want to create? Is it enough if user can select the directory and the program will create GIF-animation from pictures in that directory? That would be easy to implement if PC has TWAIN drivers installed, the Camera should show as a drive in My Computer.
: : : If you want to create animation without TWAIN drivers and when the camera gets connected, well, that will be more difficult =)
: : :
: :
: :
: :
: : the camera isnt recognized as a removable hard-drive, it comes up in the hardware list as "USB still camera". i have heard of using Interupts but i am unsure as to what they are, how they work or how to use them.
: :
: : i need to access the camera and send a command to it for it to take a picture. i know this is possible as the original program gave this feature but i want to be able to X number of successive pictures and export them for use as an animated .GIF.
: :
: :
: It will probably be a message sent to the camera driver. Interrupts are used by DOS and are very difficult to implement nowadays, because windows protects them quite well.
: A brute force approach would be to write a message hook, which shows you all the messages coming and going to the camera program (be sure to filter refreshes and paints). Then you can see which messages are sent to the camera driver. Once you have them, you can use that in your own program to make photos.
: A much more elegant way is to check wether the program exports an interface to control the camera. If it does, then you can import that interface into Delphi and use that to control the camera.
:


So how would i go about doing this?

I don't know how to create hooks and i don't know how to check for Interface Controls.

I am totally new to this area, my expertise lies in network apps.
Report
Re: Interupts? using hardware on a USB Posted by Koppis on 16 Dec 2005 at 12:58 AM
: : : : : i wish to play with some hardware, by makeing my own drivers/controll program and allowing me to do things the origanal program was not designed to let me do.
: : : : :
: : : : : the hardware in question is a Digital camera. i wish to make my program take pictures in succsession so they can be exported and used to create an animated .GIF file.
: : : : :
: : : : : any help on how to do this will be greatly appreciated.
: : : : :
: : : : What kind of program you want to create? Is it enough if user can select the directory and the program will create GIF-animation from pictures in that directory? That would be easy to implement if PC has TWAIN drivers installed, the Camera should show as a drive in My Computer.
: : : : If you want to create animation without TWAIN drivers and when the camera gets connected, well, that will be more difficult =)
: : : :
: : :
: : :
: : :
: : : the camera isnt recognized as a removable hard-drive, it comes up in the hardware list as "USB still camera". i have heard of using Interupts but i am unsure as to what they are, how they work or how to use them.
: : :
: : : i need to access the camera and send a command to it for it to take a picture. i know this is possible as the original program gave this feature but i want to be able to X number of successive pictures and export them for use as an animated .GIF.
: : :
: : :
: : It will probably be a message sent to the camera driver. Interrupts are used by DOS and are very difficult to implement nowadays, because windows protects them quite well.
: : A brute force approach would be to write a message hook, which shows you all the messages coming and going to the camera program (be sure to filter refreshes and paints). Then you can see which messages are sent to the camera driver. Once you have them, you can use that in your own program to make photos.
: : A much more elegant way is to check wether the program exports an interface to control the camera. If it does, then you can import that interface into Delphi and use that to control the camera.
: :
:
:
: So how would i go about doing this?
:
: I don't know how to create hooks and i don't know how to check for Interface Controls.
:
: I am totally new to this area, my expertise lies in network apps.
:

I don't know about hooks much either. I have seen one keyboard hook created by Utilmind, but not needed it yet. Also hooks can be created by writing a dll-file that will catch the messages and do what it want with them. Usually used to catch messages and pass it forward + pass it to your program which will keep record of the messages. I believe you must start writing a dll.
After the dll is finished, you load it in your program, using LoadLibrary() or something like that.. Then you free it at OnClose. Also you write some kind of messageprocessing function in your program to see what messages you get. That simple..
I also use http://delphi.about.com/. There was one dll-writing tutorial if I remember right..



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.