Hi.
I have a multithreaded application where i open a comport via
The read/write works ok, but when i close the port via CloseHandle(), the application crashes..Code:CreateFile(buf, FILE_SHARE_READ|FILE_SHARE_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_NO_BUFFERING, NULL).
I read in msn that you have to open it with the DELETE flag set, but read/write returns an error when i do that..I tried several combinations, but when i use the other combinations of flags, i can't read, or the app crashes when i close the port..
Does anyone have the right combination?



LinkBack URL
About LinkBacks


