AOA Forums AOA Forums AOA Forums Folding For Team 45 AOA Files Home Front Page Become an AOA Subscriber! UserCP Calendar Memberlist FAQ Search Forum Home


Go Back   AOA Forums > Software > Programming and Assembly Language

Programming and Assembly Language Please read this Topic's rules!!


Reply
 
LinkBack Thread Tools Rate Thread
  #1 (permalink)  
Old 28th June, 2003, 03:03 AM
barneygumble742's Avatar
Member
 
Join Date: June 2003
Posts: 397
Send a message via AIM to barneygumble742 Send a message via Yahoo to barneygumble742

"talking" to a device

hello,

what type of C/C++ knowledge or subject should i know in order to "talk" to devices such as a cdrom or a usb dsl modem? for example i was thinking of creating a program that would show only the information about a device (such as the company and model number). i know windows XP automatically pops up a tiny box that says the exact type of (for example) digital camera or scanner that was just plugged in.

thanks,
barneygumble742
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 28th June, 2003, 09:42 AM
Chief Systems Administrator
 
Join Date: September 2001
Location: Europe
Posts: 13,075

In terms of C or C++, you'll need to know the generics of either language! Once you can handle writing programs in either language, then you can look further to calling parts of the OS to get things you want done.

In terms of USB, each USB device has a configuration block onboard that contains a lot of information about the USB device. This includes the name of the device in several different languages, as well as class types, vendor IDs and device IDs.

For USB that's how Windows gets the name of the device - the device provides it when interrogated.

Devices like CD-ROMs and Hard disks operate in a similar way. There's a command that can be send across the IDE (or SCSI) bus that requests the identity of the device. However, this is done in a totally different way to USB, as the interface is completely different.

You'll need to find a way to ask Windows what devices are connected - it might be best interrogating the registry, as this information is usually stored there. You certainly don't want to be talking directly to the hardware, as there's more than one standard for talking to USB controllers. Thrown on top of that, there is the chance that Windows would be communicating with the hardware, and you could end up doing nasty things accessing hardware directly.
__________________
Any views, thoughts and opinions are entirely my own. They don't necessarily represent those of my employer (BlackBerry).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 29th June, 2003, 10:30 PM
barneygumble742's Avatar
Member
 
Join Date: June 2003
Posts: 397
Send a message via AIM to barneygumble742 Send a message via Yahoo to barneygumble742

hi,

i understand that every device has to have a very tiny amount of memory for identification. and this memory is ROM (am i correct?) and if it is ROM, then there isn't really any way of disturbing the device.

barneygumble742
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fresh from it's "sucess?" with Vista, MS introduces "Milan!" Daniel ~ OS, Software, Firmware, and BIOS 1 30th May, 2007 04:11 PM
Fresh from it's "sucess?" with Vista, MS introduces "Milan!" Daniel ~ OS, Software, Firmware, and BIOS 0 30th May, 2007 03:48 PM
"AMD: Bringing "Torrenza" and "Fusion" Together" Daniel ~ AMD Motherboards & CPUs 1 20th March, 2007 02:59 AM
Latest ATI "R600," "R610" and "R630" details danrok Graphics and Sound cards; Speakers and other Peripherals 0 9th January, 2007 10:44 AM
Where to plug "Line In" Device with 8RDA+ and Rear Speakers plugged in "Line In" MegaManX4 EPoX MotherBoards 8 18th June, 2003 10:19 PM


All times are GMT +1. The time now is 03:00 PM.


Copyright ©2001 - 2023, AOA Forums
Don't Click Here Don't Click Here Either

Search Engine Friendly URLs by vBSEO 3.3.0