Click here to Skip to main content
16,011,578 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Are you running the latest VC6? Pin
Lockhart16-Mar-02 4:39
Lockhart16-Mar-02 4:39 
GeneralDouble Click on List Control Pin
15-Mar-02 22:35
suss15-Mar-02 22:35 
GeneralRe: Double Click on List Control Pin
Christopher Duncan16-Mar-02 7:40
Christopher Duncan16-Mar-02 7:40 
GeneralRe: Double Click on List Control Pin
Derek Waters17-Mar-02 12:36
Derek Waters17-Mar-02 12:36 
GeneralPlaySound and SND_RESOURCE Pin
Rickard Andersson2015-Mar-02 21:48
Rickard Andersson2015-Mar-02 21:48 
QuestionHow to create multithread? Pin
15-Mar-02 21:23
suss15-Mar-02 21:23 
AnswerRe: How to create multithread? Pin
Mazdak15-Mar-02 21:37
Mazdak15-Mar-02 21:37 
GeneralRe: How to create multithread? Pin
15-Mar-02 21:45
suss15-Mar-02 21:45 
Thanks for your reply!

Yes....I need to create 50 separate threads (liked 50 different transactions). Since my program is going to simulate the DBMS behavior, in the MyThreadProc() there should be some algorithm to choose whether the current operation of this transaction is READ or WRITE. In this case, all 50 threads will use the same MyThreadProc() and i don't need to make 50 different MyThreadProc(). My question is,

1. Can i create these thread by:

for (i=0; i<50; i++)
{
pNewObject = new CMyObject;
AfxBeginThread(MyThreadProc, pNewObject);
}

2. How to identify Xth thread after creating 50 threads?

3. What parameter I need to put in order to suspend/resume/kill the 10th (or Xth) Thread? Because let say, one thread A (transaction) is READING a data object, and another thread B wants to WRITE the same data object. In this case, thread B needs to wait until thread A finish. So I have to suspend thread B......and wait....then resume.

So, should I call AfxGetThread()???? SuspendThread()??? ResumeThread()????


Thanks!!!!
GeneralRe: How to create multithread? Pin
Nish Nishant15-Mar-02 22:13
sitebuilderNish Nishant15-Mar-02 22:13 
GeneralRe: How to create multithread? Any example? Pin
16-Mar-02 6:53
suss16-Mar-02 6:53 
QuestionClient/Server programming over internet??? Pin
Rickard Andersson2015-Mar-02 20:47
Rickard Andersson2015-Mar-02 20:47 
AnswerRe: Client/Server programming over internet??? Pin
Nish Nishant15-Mar-02 21:07
sitebuilderNish Nishant15-Mar-02 21:07 
GeneralRe: Client/Server programming over internet??? Pin
Rickard Andersson2015-Mar-02 21:44
Rickard Andersson2015-Mar-02 21:44 
GeneralRe: Client/Server programming over internet??? Pin
Nish Nishant15-Mar-02 22:00
sitebuilderNish Nishant15-Mar-02 22:00 
GeneralRe: Client/Server programming over internet??? Pin
Rickard Andersson2015-Mar-02 22:20
Rickard Andersson2015-Mar-02 22:20 
QuestionHow do you call a default view in MDI application? Pin
Jasmyn15-Mar-02 19:55
Jasmyn15-Mar-02 19:55 
GeneralA strange problem! Pin
Davidlou15-Mar-02 18:42
Davidlou15-Mar-02 18:42 
GeneralRe: A strange problem! Pin
Nish Nishant15-Mar-02 18:42
sitebuilderNish Nishant15-Mar-02 18:42 
GeneralRe: A strange problem! Pin
Davidlou15-Mar-02 19:00
Davidlou15-Mar-02 19:00 
GeneralRe: A strange problem! Pin
Christian Graus15-Mar-02 19:06
protectorChristian Graus15-Mar-02 19:06 
GeneralRe: A strange problem! Pin
Christian Graus15-Mar-02 19:08
protectorChristian Graus15-Mar-02 19:08 
GeneralRe: A strange problem! Pin
Davidlou15-Mar-02 19:12
Davidlou15-Mar-02 19:12 
GeneralRe: A strange problem! Pin
Christian Graus15-Mar-02 18:52
protectorChristian Graus15-Mar-02 18:52 
Generala question in learning the Programing Windows with MFC Pin
Angel Kid15-Mar-02 17:46
Angel Kid15-Mar-02 17:46 
GeneralRe: a question in learning the Programing Windows with MFC Pin
Nish Nishant15-Mar-02 18:01
sitebuilderNish Nishant15-Mar-02 18:01 

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.