Click here to Skip to main content
15,913,854 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to deal with SafeArrayDestroy error? Pin
Jose Lamas Rios28-Aug-05 6:59
Jose Lamas Rios28-Aug-05 6:59 
GeneralRe: how to deal with SafeArrayDestroy error? Pin
liuyue28-Aug-05 14:40
liuyue28-Aug-05 14:40 
Questionlinking error! Pin
alias001827-Aug-05 21:50
alias001827-Aug-05 21:50 
AnswerRe: linking error! Pin
Garth J Lancaster28-Aug-05 0:24
professionalGarth J Lancaster28-Aug-05 0:24 
AnswerRe: linking error! Pin
Trollslayer28-Aug-05 6:22
mentorTrollslayer28-Aug-05 6:22 
GeneralRe: linking error! Pin
Garth J Lancaster28-Aug-05 15:52
professionalGarth J Lancaster28-Aug-05 15:52 
GeneralRe: linking error! Pin
Anonymous30-Aug-05 0:28
Anonymous30-Aug-05 0:28 
QuestionHandling 2 threads Pin
Watertreader27-Aug-05 21:05
Watertreader27-Aug-05 21:05 
Hi, I am trying to code for some image acquisition application and I need to handle two hardware in my coding. One of them is a camera while the other is an image pattern generator which could be programmed. The camera can be set to be on, taking in sequence of images while the image pattern generator would change at some prefix timing

I am trying to do some threading coding to run both of the device in parallel. So I am wondering whether I could do the following and get some synchronisation

acqthread{
......
......

CameraHandle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) cameraThread, (void *)this, 0, &dwThreadId);

PatternGenHandle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) PatternGenThread, (void *)this, 0, &dwThreadId);

WaitForMultipleObjects(2, hEVents, TRUE,INFINITE);
}

DWORD CameraThread(void * pv){

.......
// run a sequence of events

}

DWORD PatternGenThread(void * pv){
.......
// Load a series of patterns
}

Would it also work if I only create one thread and put the coding of one hardware into the main function? Or does the running of the main thread has piority over the subthread?


AnswerRe: Handling 2 threads Pin
Gary R. Wheeler28-Aug-05 3:24
Gary R. Wheeler28-Aug-05 3:24 
Questionwhen "GlobalAlloc(GPTR, 100);" excute, why a "int 3" apear in Ntdll.dll? Pin
yanping wang27-Aug-05 20:27
yanping wang27-Aug-05 20:27 
QuestionActivating "Execl XML toolbox" functionalities from C++ Pin
Hillel27-Aug-05 20:16
Hillel27-Aug-05 20:16 
Questiongetting drive type in .NET Pin
/*Trucker*\27-Aug-05 19:32
/*Trucker*\27-Aug-05 19:32 
QuestionIAddrBook::OpenEntry Pin
PJ Arends27-Aug-05 12:59
professionalPJ Arends27-Aug-05 12:59 
AnswerRe: IAddrBook::OpenEntry Pin
Jose Lamas Rios27-Aug-05 16:56
Jose Lamas Rios27-Aug-05 16:56 
GeneralRe: IAddrBook::OpenEntry Pin
PJ Arends27-Aug-05 17:54
professionalPJ Arends27-Aug-05 17:54 
GeneralRe: IAddrBook::OpenEntry Pin
Jose Lamas Rios27-Aug-05 17:57
Jose Lamas Rios27-Aug-05 17:57 
Questionfile access Pin
Ali Tavakol27-Aug-05 12:52
Ali Tavakol27-Aug-05 12:52 
AnswerRe: file access Pin
David Crow28-Aug-05 4:49
David Crow28-Aug-05 4:49 
QuestionInternetGetConnectedState problem Pin
Spiritofamerica27-Aug-05 11:26
Spiritofamerica27-Aug-05 11:26 
AnswerRe: InternetGetConnectedState problem Pin
Jose Lamas Rios27-Aug-05 17:11
Jose Lamas Rios27-Aug-05 17:11 
GeneralRe: InternetGetConnectedState problem Pin
Spiritofamerica27-Aug-05 21:53
Spiritofamerica27-Aug-05 21:53 
AnswerRe: InternetGetConnectedState problem Pin
includeh1027-Aug-05 21:30
includeh1027-Aug-05 21:30 
GeneralRe: InternetGetConnectedState problem Pin
Spiritofamerica27-Aug-05 21:54
Spiritofamerica27-Aug-05 21:54 
GeneralRe: InternetGetConnectedState problem Pin
includeh1028-Aug-05 13:52
includeh1028-Aug-05 13:52 
AnswerRe: InternetGetConnectedState problem Pin
David Crow28-Aug-05 4:50
David Crow28-Aug-05 4:50 

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.