Click here to Skip to main content
15,897,273 members
Home / Discussions / C#
   

C#

 
AnswerRe: Memory allocation Pin
Colin Angus Mackay30-Aug-06 9:56
Colin Angus Mackay30-Aug-06 9:56 
GeneralRe: Memory allocation Pin
pawelpus30-Aug-06 11:58
pawelpus30-Aug-06 11:58 
QuestionCreating dependent programs Pin
ToBrax30-Aug-06 4:53
ToBrax30-Aug-06 4:53 
AnswerRe: Creating dependent programs Pin
albCode30-Aug-06 4:56
albCode30-Aug-06 4:56 
AnswerRe: Creating dependent programs Pin
mikone30-Aug-06 4:59
mikone30-Aug-06 4:59 
QuestionCompare 2 DataTables Pin
Omkar Ghaisas30-Aug-06 4:44
Omkar Ghaisas30-Aug-06 4:44 
AnswerDon't crosspost Pin
leckey30-Aug-06 7:42
leckey30-Aug-06 7:42 
QuestionPorts.SerialPort freezes Pin
sjembek30-Aug-06 4:44
sjembek30-Aug-06 4:44 
Hi I'm using the SerialPort class (.net 2.0) for rs232 communications. Unfortunately, an it freezes up my program when I try to set a parameter for it after it's been opened.

First I initialize the port:
SerialPort port = new SerialPort(comname, 19200);
port.Open();
port.ReceivedBytesThreshold = 63;
port.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived);


Then I do some communications stuff. So far so good. The freeze occurs when I try to use the port for some other process.

if (port.IsOpen) 
   {
   port.DiscardInBuffer(); // will freeze here
   port.DiscardOutBuffer(); // here
   port.Close();            // here
   }

port.ReceivedBytesThreshold = 1; // or here
port.Open();


Any of the commented line freeze up my program as if in a blocking state, and the code doesn't throw an exception of any kind, it just freezes each and any thread currently running. Does anyone have any clues what's happening here?
AnswerRe: Ports.SerialPort freezes Pin
sjembek30-Aug-06 5:20
sjembek30-Aug-06 5:20 
GeneralRe: Ports.SerialPort freezes Pin
Dave Kreskowiak30-Aug-06 5:51
mveDave Kreskowiak30-Aug-06 5:51 
QuestionSearch Pattern Pin
Sabry190530-Aug-06 4:38
Sabry190530-Aug-06 4:38 
AnswerRe: Search Pattern Pin
mikone30-Aug-06 4:52
mikone30-Aug-06 4:52 
GeneralRe: Search Pattern Pin
Dave Kreskowiak30-Aug-06 5:49
mveDave Kreskowiak30-Aug-06 5:49 
AnswerRe: Search Pattern Pin
Judah Gabriel Himango30-Aug-06 5:12
sponsorJudah Gabriel Himango30-Aug-06 5:12 
AnswerRe: Search Pattern Pin
Judah Gabriel Himango30-Aug-06 7:02
sponsorJudah Gabriel Himango30-Aug-06 7:02 
GeneralRe: Search Pattern Pin
Sabry190530-Aug-06 7:44
Sabry190530-Aug-06 7:44 
QuestionSQL problem Pin
printscreen1234530-Aug-06 4:25
printscreen1234530-Aug-06 4:25 
AnswerRe: SQL problem Pin
Not Active30-Aug-06 4:39
mentorNot Active30-Aug-06 4:39 
GeneralRe: SQL problem Pin
mikone30-Aug-06 4:44
mikone30-Aug-06 4:44 
AnswerRe: SQL problem Pin
gus_br30-Aug-06 6:35
gus_br30-Aug-06 6:35 
QuestionAdding a row from one table to another Pin
kalyanPaladugu30-Aug-06 4:13
kalyanPaladugu30-Aug-06 4:13 
AnswerRe: Adding a row from one table to another Pin
mikone30-Aug-06 4:37
mikone30-Aug-06 4:37 
QuestionProblem with timer event fireing Pin
Tom Wright30-Aug-06 4:01
Tom Wright30-Aug-06 4:01 
AnswerRe: Problem with timer event fireing Pin
mikone30-Aug-06 4:18
mikone30-Aug-06 4:18 
GeneralRe: Problem with timer event fireing Pin
Tom Wright30-Aug-06 4:24
Tom Wright30-Aug-06 4:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.