Click here to Skip to main content
15,905,782 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: sending a string as keyboard keystrokes wrongly Pin
nitin329-Jun-07 0:47
nitin329-Jun-07 0:47 
QuestionNeed to translate the text from one language(English) to other(Korean) Pin
Venigandla28-Jun-07 20:25
Venigandla28-Jun-07 20:25 
AnswerRe: Need to translate the text from one language(English) to other(Korean) Pin
Rajesh R Subramanian28-Jun-07 20:53
professionalRajesh R Subramanian28-Jun-07 20:53 
AnswerRe: Need to translate the text from one language(English) to other(Korean) Pin
swarup28-Jun-07 21:42
swarup28-Jun-07 21:42 
AnswerRe: Need to translate the text from one language(English) to other(Korean) Pin
hairy_hats29-Jun-07 0:10
hairy_hats29-Jun-07 0:10 
AnswerRe: Need to translate the text from one language(English) to other(Korean) Pin
Hamid_RT29-Jun-07 3:16
Hamid_RT29-Jun-07 3:16 
QuestionDialog Bar Problem Pin
g_sandipan28-Jun-07 20:10
g_sandipan28-Jun-07 20:10 
QuestionPortuser.cpp to get TCP/UDP tables with PIDS for pre-XP Pin
Akin Ocal28-Jun-07 19:31
Akin Ocal28-Jun-07 19:31 
QuestionProviding Seurity to Application Pin
swamy Narasimha28-Jun-07 19:23
swamy Narasimha28-Jun-07 19:23 
AnswerRe: Providing Seurity to Application Pin
_AnsHUMAN_ 28-Jun-07 20:23
_AnsHUMAN_ 28-Jun-07 20:23 
GeneralRe: Providing Seurity to Application Pin
swamy Narasimha28-Jun-07 21:18
swamy Narasimha28-Jun-07 21:18 
QuestionDisplay html and text data Pin
john563228-Jun-07 19:20
john563228-Jun-07 19:20 
AnswerRe: Display html and text data Pin
Hamid_RT29-Jun-07 3:05
Hamid_RT29-Jun-07 3:05 
QuestionMFC FrameWork concepts Pin
prithaa28-Jun-07 18:50
prithaa28-Jun-07 18:50 
QuestionRe: MFC FrameWork concepts Pin
Rajkumar R28-Jun-07 18:56
Rajkumar R28-Jun-07 18:56 
AnswerRe: MFC FrameWork concepts Pin
swarup28-Jun-07 19:06
swarup28-Jun-07 19:06 
AnswerRe: MFC FrameWork concepts Pin
Jhony george28-Jun-07 21:47
Jhony george28-Jun-07 21:47 
AnswerRe: MFC FrameWork concepts Pin
Hamid_RT29-Jun-07 3:06
Hamid_RT29-Jun-07 3:06 
GeneralRe: MFC FrameWork concepts Pin
prithaa29-Jun-07 4:26
prithaa29-Jun-07 4:26 
GeneralRe: MFC FrameWork concepts Pin
Hamid_RT29-Jun-07 5:34
Hamid_RT29-Jun-07 5:34 
Questionhow to understand CFileDialog(TURE or FALSE) parameters Pin
gentleguy28-Jun-07 18:41
gentleguy28-Jun-07 18:41 
AnswerRe: how to understand CFileDialog(TURE or FALSE) parameters Pin
swarup28-Jun-07 19:04
swarup28-Jun-07 19:04 
AnswerRe: how to understand CFileDialog(TURE or FALSE) parameters Pin
swarup28-Jun-07 19:05
swarup28-Jun-07 19:05 
Questionhow to write a correct Multi Threaded Application [modified] Pin
swarup28-Jun-07 18:36
swarup28-Jun-07 18:36 
hi guys,
i have a dialog application, i want to launch 10 worker thread and each worker thread will do a particular work, ie. each worker thread will connect to a url and download the page content, and they will parse the page and write some data to a database, so imagine if there are 1000 pages then if i go by general way of geting pages one by one it will take me around 20 mins to 45 mins, so i was thinking if launch 10 thread which in term each will collect 1 page then the time may be reduced,

my problem or query is,

as fas of today is, we all using single processor, so no matter how many threads u create, any given point of time only one instruction will carried out, but when i launch more then one application of mine and break up the collection say app1 collects 100 and app2 collects another 100, this is faster then collecting 1000 in 1 application, so breakin it to threads will help or not,

how to code for it, do you have any idea i mean any design for it, or any help for it,

cas i cant write 10 diff function for each thread,i want one function to do all the work but i will pass diff parameter for each thread, but then comes the problem resource access violation if i call the same function for each thread,

so is there a way i can the thread callback to a class, or i can put the whole code, for say
class mythrdcls
{
mythrdcls(char *)
{}
void create(){}
void dothetask(){}// like a thread callback function
void running(){}
void destroy(){}
}

so please give me an idea how to do it,
ya one more thing i forgot to add here, when i call createthread or afxbeginthread, i have to call a thread callback, i want to pass some arguments to my thread callback funcion, so i can pass them in param value, i want to pass more then one value so i have to create a structure and pass it, but the problem is in thread function it does not reflect the correct value,
ie struct th
{ int x;int y} x;
x.y=10,x.x=1
beginthread(function1, x);
x.y=20,x.x=2
beginthread(function2, x);
function1()
a=x;
a.x///////////does not alwys contain 1 ie cas by the time callback is called the value is changed to 2 so how can make sure tht unless the thread callback is called the 2nd thread cant be created or ast thread get the corect value and so 2nd thread also, i used waitforsingleobject but it did not help


Thanks a lot


AnswerRe: how to write a correct Multi Threaded Application Pin
swarup29-Jun-07 5:14
swarup29-Jun-07 5:14 

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.