Solved

single threaded application into multithreaded application

Posted on 2002-04-14
3
138 Views
Last Modified: 2013-11-20
i have a single threaded application(exe). Now i have to change it into multi threaded one. can any one suggest me how to migrate from single threaded to multi threaded application.
thanks in advance
ravi
0
Comment
Question by:ravikirang
3 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 100 total points
ID: 6939924
Well, strictly speaking the answer to your question is to create a thread somewhere in your single-threaded application.  So a AfxBeginThread() might be a good place to start.

What is totally unclear from your question is WHY you want to do such a thing.  A serious answer can really only be given to a serious question.  As it is, your question is silly.  Saying "I have to changed it to multi-threaded" makes me believe that this is a HOMEWORK assignment and not real work.  If it were real work, you'd have some specific goal in mind for improving an existing single-threaded application by making it multi-threaded.  Multi-threading is not an end in itself.  It's a tool that can SOMETIMES be useful and powerful.  It can also be a detriment when used for the wrong reasons....

Frankly, I suspect you are a student and are asking this since it was assined in your class.  As such, you really should review the Experts Exchange policy regarding academics...
0
 
LVL 10

Expert Comment

by:makerp
ID: 6941284
void __cdecl my_great_thread(void *dummy)
{
  while(1)
  {
    MessageBox("void __cdecl my_great_thread(void *dummy) says hi there :)");
  }
}

place this in InitInstance

_beginthread(my_great_thread,0,NULL);

now you have a multi-threaded app
0
 

Author Comment

by:ravikirang
ID: 6944109
mr jhance, I'm very sorry for not clear in my question.
I'm new to ATL. I 'm working on developing loadtesting software. Here as a proof of concept i developed a single threaded application which captures dom events as well as user events. But i left with two challenges.

1 migrating my application into multi threaded one
2 capturing Alert boxes which are going to fired on browser(Security alerts in hotmail when ever user login into it).

As per your suggestion i'll try with afxbeginthread implementation. but please suggest me a better solution.

thanking you
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Separate files macro - Errors on larger data set 18 65
ShiftLeft challenge 21 76
canBalance challenge 34 69
Fibonacci challenge 11 108
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now