Click here to Skip to main content
15,918,243 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralBetter SetTimer Pin
Manikandan29-May-02 21:59
Manikandan29-May-02 21:59 
GeneralRe: Better SetTimer Pin
Prem Kumar29-May-02 22:19
Prem Kumar29-May-02 22:19 
GeneralRe: Better SetTimer Pin
Paul M Watt30-May-02 5:40
mentorPaul M Watt30-May-02 5:40 
GeneralW2A query Pin
Nish Nishant29-May-02 21:39
sitebuilderNish Nishant29-May-02 21:39 
GeneralRe: W2A query Pin
[James Pullicino]30-May-02 1:38
[James Pullicino]30-May-02 1:38 
GeneralRe: W2A query Pin
Michael Dunn30-May-02 5:28
sitebuilderMichael Dunn30-May-02 5:28 
GeneralRe: W2A query Pin
Nish Nishant30-May-02 15:00
sitebuilderNish Nishant30-May-02 15:00 
GeneralVC++ timer and multithreading problems Pin
29-May-02 21:11
suss29-May-02 21:11 
Dear All,

APPLICATION:

To run two processes simultaneously

Brief Description of Project

64 i/os are interfaced using 8 i/o modules that communicate with PC via RS232/RS485 converter. Modules are microcontroller based which give input data to PC coming from the machine and pass on the output data generated by the PC, back to the machine.

The code is written in VC++ and used multithreading for parallel process. The operation needs some TIMERS for wait process.

Following are the queries:

1 The process demands TIMERS are to be continuously monitored for elapsed time and saved in an .ini file format when thread is in running state. Can anyone suggest the right method of doing so?

2 Only two threads are being used. Here, we are using ‘SwitchToThread()’ function to switch the system resources between two processes. Is this the right method ?

Following is the brief code we have used:

CreateThread() T1 // in SDK DLL
{
Function1(); // To read the .ini file for process 1
{
SwitchToThread();
}
}

CreateThread() T2 // in SDK DLL
{

Function2(); // To read .ini file for process 2
{
SwitchToThread();
}

}

Please spare some time and give me your valuable suggestions.

GeneralRe: VC++ timer and multithreading problems Pin
KarstenK29-May-02 23:26
mveKarstenK29-May-02 23:26 
GeneralData Transfer - Help!!! Pin
Sameer Maggon29-May-02 20:29
Sameer Maggon29-May-02 20:29 
GeneralRe: Data Transfer - Help!!! Pin
Ed Gadziemski30-May-02 11:25
professionalEd Gadziemski30-May-02 11:25 
GeneralSorting Pin
29-May-02 19:42
suss29-May-02 19:42 
QuestionHow does CAsyncSocket start it's notification loop? Pin
29-May-02 18:41
suss29-May-02 18:41 
AnswerRe: How does CAsyncSocket start it's notification loop? Pin
Joaquín M López Muñoz29-May-02 19:53
Joaquín M López Muñoz29-May-02 19:53 
GeneralRe: Thx (How does CAsyncSocket start it's notification loop?) Pin
29-May-02 20:30
suss29-May-02 20:30 
GeneralCListCtrl Overlay Images. Pin
myfriendofmisery29-May-02 18:40
myfriendofmisery29-May-02 18:40 
GeneralRe: CListCtrl Overlay Images. Pin
Shog929-May-02 19:30
sitebuilderShog929-May-02 19:30 
GeneralTAPI Pin
Sameer Maggon29-May-02 18:34
Sameer Maggon29-May-02 18:34 
GeneralRe: TAPI Pin
Michael P Butler29-May-02 22:01
Michael P Butler29-May-02 22:01 
GeneralMessage Queue and Threads Pin
wilche29-May-02 17:51
wilche29-May-02 17:51 
GeneralRe: Message Queue and Threads Pin
Prem Kumar29-May-02 18:28
Prem Kumar29-May-02 18:28 
GeneralRe: Message Queue and Threads Pin
wilche30-May-02 13:52
wilche30-May-02 13:52 
GeneralRe: Message Queue and Threads Pin
Bill Wilson30-May-02 12:12
Bill Wilson30-May-02 12:12 
GeneralRe: Message Queue and Threads Pin
wilche30-May-02 13:48
wilche30-May-02 13:48 
GeneralPassing Pointer Between DLL & App Pin
29-May-02 17:08
suss29-May-02 17:08 

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.