Solved

single threaded application into multithreaded application

Posted on 2002-04-14
3
136 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

708 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

20 Experts available now in Live!

Get 1:1 Help Now