Issues with COM Serial Close hagging when calling the .close

Im having difficulties in trying to close a COM port that is associated to winachsf0 com3

It seems when I encounter this COM 3 it will open the COM port but it will always have issues closing it and it seems to hang my program.

How can I avoid any program hangs what would be the best way of error handling this?

Thanks
cmdolcetAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CodeCruiserCommented:
I don't think there is a timeout setting for the Close method. You may be able to use a thread to call the close method and kill the thread after a set interval if it does not complete.
0
cmdolcetAuthor Commented:
OK, I will try that......have you ever encountered the  "winachsf0" on strickly on laptops from what I see and is there any way to disable this or remove it?
0
CodeCruiserCommented:
I have not encountered it I am afraid.
0
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

cmdolcetAuthor Commented:
Code Cruiser, I am still not able to avoid this issue. It seems the only way around it is to force the COM port over to COM 3 which will then work, in the device manage.
0
CodeCruiserCommented:
I am afraid I don't have anything else to say about this issue.
0
cmdolcetAuthor Commented:
How do I do the following: "You may be able to use a thread to call the close method and kill the thread after a set interval if it does not complete. "
0
CodeCruiserCommented:
Try following

1) Add a method which closes the port
2) Add a timer to the form and set its interval as desired
3) Create a thread which executes the method defind in 1
4) Abort the thread in timer's tick event.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.