|
-
Jun 24th, 2009, 10:29 AM
#1
Thread Starter
Member
RS232 communication
I have a VB6 application that needs to open a COM port and output a string. However, it appears that another process has the COM port open at the time I want to open it. I am using an MSComm control, and of course, when I try to open the port already in use an error is generated.
Does anyone know a way where I can output a string from my VB6 application when another thread has the port in use?
Thanks in advance for the help.
-
Jun 24th, 2009, 03:43 PM
#2
Re: RS232 communication
Are you using Dialup or are you posting here using broadband?
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing?? 
-
Jun 25th, 2009, 07:23 AM
#3
Thread Starter
Member
Re: RS232 communication
Interesting question. I'll take the non-responses to mean that this is not possible with VB6.
-
Jun 25th, 2009, 09:04 AM
#4
Addicted Member
Re: RS232 communication
if your on dial-up...that's probably who(your modem) has the port control. Some where here on the net is VBcode to detect free com ports.
-
Jun 25th, 2009, 09:34 AM
#5
Re: RS232 communication
 Originally Posted by jjsomer
Interesting question. I'll take the non-responses to mean that this is not possible with VB6.
I take it that you know that another app has access to the port. The answer to your question is no. I doubt that VBNET will allow it either, as I believe this issue is more of a Windows convention than a VB issue.
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing?? 
-
Jun 25th, 2009, 06:11 PM
#6
Re: RS232 communication
What do you want your app to do after it accesses the port? Perhaps there's another solution, like accessing a different port?
Last edited by CDRIVE; Jun 25th, 2009 at 06:14 PM.
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing?? 
-
Jun 25th, 2009, 09:29 PM
#7
Member
Re: RS232 communication
Once the comm port is open, it can not be open again by another program. The first program have to close it before it can re open again.
Unlike files which can open as share. Comm port always open for 2 ways communication. You need a 2nd comm port in your case.
-
Jun 26th, 2009, 12:34 AM
#8
Addicted Member
Re: RS232 communication
you cannot open the same port twice !!!
there are several ways you can achieve the same result
1. what you can do is open the port from one app, then when the second app wants to open it, it must send a command to the first app to close the port, now the port can be opened by the second app.
2. Alternatively make a common program that receives instructions from both the apps, the common program (called 'comm. interface') can stream data to either of these apps. Of course you need to establish a system of communications between the apps and the 'comm interface' program.
thanks
ar
-
Jun 26th, 2009, 05:13 PM
#9
Re: RS232 communication
This would be a bit of work... but if you create an app with an Browser Control & DialUp procedure on it, then you will have full control of the port while on line.
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing?? 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|