Thread and serial port
-
I am new to programming. I have been given the task of making an application that recieves commands via the serial port. and then displays a notification that the commands were recieved. I have been told that I need to use a thread to do this. I'm not sure where the thread goes, I.E does it go in the source file or the header file? Or do I declare it in the header file and then put the functionality in the OnInitialDialog function? Thank you for any help. Mavrock
-
I am new to programming. I have been given the task of making an application that recieves commands via the serial port. and then displays a notification that the commands were recieved. I have been told that I need to use a thread to do this. I'm not sure where the thread goes, I.E does it go in the source file or the header file? Or do I declare it in the header file and then put the functionality in the OnInitialDialog function? Thank you for any help. Mavrock
Mavrock, I have done something similar but nowhere near doing an article yet. Basically: 1. Create a dialogue box 2. Insert the Mircosoft communications ActiveX component into it. 3. Create a variable name for the ActiveX component. This then creates a class for the MSCOMM component (prompt displayed). 4. Set the RThreshold property to 1. This causes an OnCommEvent for every character received. 5. In the OnCommEvent() procedure, event 2 is for soemthing received. If you want a small sample project let me have your email address and I'll forward it. I have used this on Win98 and NT4 with no problems. Elaine (fluffy tigress emoticon) Would you like to meet my teddy bear ?
-
Mavrock, I have done something similar but nowhere near doing an article yet. Basically: 1. Create a dialogue box 2. Insert the Mircosoft communications ActiveX component into it. 3. Create a variable name for the ActiveX component. This then creates a class for the MSCOMM component (prompt displayed). 4. Set the RThreshold property to 1. This causes an OnCommEvent for every character received. 5. In the OnCommEvent() procedure, event 2 is for soemthing received. If you want a small sample project let me have your email address and I'll forward it. I have used this on Win98 and NT4 with no problems. Elaine (fluffy tigress emoticon) Would you like to meet my teddy bear ?
Dear Elaine, Thank you for the direction. If you don't mind I would really like to see your sample project. You can send it to me at stonematthies@hotmail.com. thanks. Mavrock
-
Dear Elaine, Thank you for the direction. If you don't mind I would really like to see your sample project. You can send it to me at stonematthies@hotmail.com. thanks. Mavrock
On this site codeproject.com and on codeguru.com, you can find many articles about your topic
Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com