Hello,
Anybody can give me idea, How can i check COM port? I want to check, is it already open or not? if it is already open, just avoid to open the port.

Thanks.

Just try to open it -- if open files then its probably already opened (assuming COM1 exists and there are no hardware problems)

My problem is not exactly that. I have another software that run semultaniously. The software also can open the COM1 port. If it opened, my program do not need to open COM1 port. Then Just i want to read data from the port.

If the COM1 port is in use by an other process, this resource is locked by the OS and subsequent tries to open the COM1 port will fail.

Thanks for your post. I could able to solve the problem.

Then mark this thread as solved, please

Better yet, tell US what you found out, how you solved it and then mark it closed.
Give something back.