Click here to Skip to main content
15,887,434 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm sorry that spend your time solving my question. When I communication through RS232 with API. When I pull out the line of RS232 and I do CloseHandle()in my porgram. When I insert it again and can't receivec data anymore. What happen to my program. Something will i lose? Could you halp me, please! Thanks.
Posted
Comments
OriginalGriff 22-Jun-10 5:06am    
Try posting a small relevant code fragment - enclosed with the code block widget to preserve the formatting.
Edit you existing post, and try again.

Check that CloseHandle() returns 'non-zero'. If it returns zero it has failed and you can use GetLastError() to find out what that error was.
 
Share this answer
 
Comments
smallgreen29 22-Jun-10 6:44am    
hello! returns is true. what else i can try? Please tell me. Thanks.
If CloseHandle returns TRUE then I suggest you look at how you open the port. Do you use CreateFile? What does that function return? Does it return INVALID_HANDLE_VALUE?

Perhaps you could post the code that opens the port (add it to your original question or start a new one because if you put it in the comment it is really tough to read and no-one else will notice it). :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900