473,480 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Close Comm Port opened by another program

Hi Everyone,

How can I close Serial Port opened by another program.

Regards.
Jul 7 '06 #1
2 1980
You can't.

Sezgin wrote:
Hi Everyone,

How can I close Serial Port opened by another program.

Regards.
Jul 8 '06 #2
Hi,

You cannot do this with any standard API. You would have to write a
specialized device driver.

Or, perhaps, use an available device driver, such as the on from Franson --
see the links on my homepage; this might work, depending on the details of
what needs to be done. If you take a look the the Virtual Null Modem/Data
Monitor program on my homepage, I use the Franson Virtual Serial Port object
to create a virtual "Y" connector that could be used to connect and
disconnect an external application from a serial port, thus allowing
multiple devices to share it. To use this technique, you would not have to
have access to the source code for the external application that you want to
disconnect.

If you have access to the source code for the extenal app, then there are
simpler methods (simply send it a command to disconnect, by adding an
appropriate interface).

Dick
--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
Jul 8 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3616
by: sarath1111 | last post by:
hi all, I am using comm port for serial communication between 2 PC's using C language. Once I have initialized the COMM port, Is there any option of closing the port in C language. Thanks in...
9
11315
by: AA | last post by:
This is making me crazy!! Please, if some body can help me. I'm testing a ver simple socket client. In my test I just open and close a connection (in a loop) to my local IIS server (port 80)...
6
4295
by: chandan | last post by:
I am looking for a small program or two that allows me to see what is being sent to a device on the serial port, and the response coming in the serial port from the device. When I have COM1...
2
9194
by: Max Healey | last post by:
I have written a number of applications that control various bits of hardware via serial data. using VB6 and the comm. control now some one has asked me to do one for a specific piece of...
2
1883
by: Hank | last post by:
Hello, I would like to get some opinions on using the Comm Port with Access 2000. We have a few jobs coming in that require us to interface with a PLC via the Comm Port. My partner feels we...
0
385
by: ricolee99 | last post by:
Hi Everyone, I'm using the System.IO.Ports.SerialPort component to attempt to kill an existing component opened by another application. I use the following code: SerialPort serialPort = new...
2
3728
by: Jon | last post by:
Hi, I wrote some code to read in info from a port using pyserial. the code reads info sent by a box that is connected to my computer by an rs232-to usb adapter. When I was writing the code and...
0
1368
by: | last post by:
I have written a few device classes that use the Serialport class with no problems what so ever. I finally ran into a device that need to have the Dtrenable flag set to true in order to...
2
3124
by: Bassem | last post by:
I'm working on simple chat program via serial port. It works fine, but i face this problem. When i try to open the exe, UnauthorizedAccess exception occurs, i can't use COM1 becuase someone else has...
0
6915
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
7054
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6750
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
6993
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...
0
5353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4794
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1307
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
567
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.