473,394 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to check "Is any device attached to COM port"?

Hi all,
I'm new to this community,so i think i shall introduce myself first, I'm a developer in VC++ 6.0 for past few years,

Now my mission to post this thread is

how can i find "Is any device is attached to the COM (Serial) port of my system using VC++/C++ ?

prblm:
Regardless of any device is connected to serial/COM port, the port can be opened using CFile, if no other programme has locked the port.
But i need to find Is any device is connected or not?

hope i haven't confused you.

Expecting help asap,as i'm stuck with this bottleneck for quite few hours,
Thanks in advance
Cheers,
Sujith
Aug 1 '06 #1
1 4314
Banfa
9,065 Expert Mod 8TB
I don't believe this is possible. The most basic type of device only implements ground, Tx and Rx so you have no electrical signal to tell you if a device is connected. You could look for data but not all devices send unsolicited data so you would need to know a way of getting any device to return data to you.

So detecting any device is impossible.

Detecting specific devices is possible though, for instance you could detect any modem using the Hayes command set by sending AT, all Hayes command set modems will reposnd to this with OK.
Aug 1 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Alex Shi | last post by:
Hello, I got an error message when trying following script: <? //...... if (!$handle = fsockopen ("ssl://my.com", 443, $errno, $errstr, $timeout = 30)) { print "$errno: $errstr\n"; return...
0
by: John Roper | last post by:
Hi, I have a web deployment project that asks for the port number in the standard dialog (along with the virtual directory). I also install a web service and this does not have an associated...
3
by: Stinky Pete | last post by:
I've mananged to get Access Run-time working on a Win 98 PC. I was stoked at that achievement, however I'm now stuck in that the files are opening Read only. That is, I can view all the records...
0
by: ASP Developer | last post by:
For some reason when I direct my users to a word document via Response.ContentType = "application/word" the spell check is turned off. Does anyone know which smart tag needs to be mofied to have it...
1
by: Richard | last post by:
Hi, I'm running WebMatrix, v. 0.6.812, over WinXP/SP2 with .Net Framework 1.0 & 1.1. I'm following the examples in ASP.NET Web Matrix Project Guided Tour, specifically the 2nd example at...
5
by: Matthew Zhou | last post by:
I check the ISO 9899 standard, \r (carriage return) Movesthe active position to the initial position of the current line. What does it do? How to input? I tried to use Flex to check this...
4
by: robinp.la | last post by:
Can someone explain how I would read the data from the USB "port"? I don't know if it matters, but I am trying to read the data from a GPS plugged in to the USB port. Thank you, Robin
94
by: Samuel R. Neff | last post by:
When is it appropriate to use "volatile" keyword? The docs simply state: " The volatile modifier is usually used for a field that is accessed by multiple threads without using the lock...
1
by: syed asghar abbas | last post by:
I am Student of the BS(Cs) and i am student of the Final Term and my Final Project on the Barcode Reader that "How to Connect the Barcode Reader Device Scanner With Sql Database in C# 2005 "
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.