Click here to Skip to main content
15,921,179 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Rotate Bytes Pin
David Crow7-Apr-06 8:30
David Crow7-Apr-06 8:30 
GeneralRe: Rotate Bytes Pin
Richard Andrew x647-Apr-06 8:58
professionalRichard Andrew x647-Apr-06 8:58 
QuestionDLL - Multithreading Pin
borono7-Apr-06 5:40
borono7-Apr-06 5:40 
AnswerRe: DLL - Multithreading Pin
Richard Andrew x647-Apr-06 5:58
professionalRichard Andrew x647-Apr-06 5:58 
GeneralRe: DLL - Multithreading Pin
borono7-Apr-06 6:09
borono7-Apr-06 6:09 
GeneralRe: DLL - Multithreading Pin
Richard Andrew x647-Apr-06 6:21
professionalRichard Andrew x647-Apr-06 6:21 
GeneralRe: DLL - Multithreading Pin
borono7-Apr-06 7:01
borono7-Apr-06 7:01 
GeneralRe: DLL - Multithreading Pin
Richard Andrew x647-Apr-06 7:16
professionalRichard Andrew x647-Apr-06 7:16 
Well, the easy way out of your problem would be to call CreateThread in your DllMain function, so that your device polling happens on this second thread, and your main thread is free to return to the VB form.

DWORD ThreadId = 0;

HANDLE ThreadHandle = CreateThread( NULL, NULL, ProcessingFunction, lpParameter, NULL, &ThreadId );


Then your processing function would be declared as follows:

DWORD WINAPI ProcessingFunction(
  LPVOID lpParameter
);


Just put all your processing code into the ProcessingFunction, and you will have it running on a separate thread. But you will be responsible for communicating to the second thread when it needs to quit.
GeneralRe: DLL - Multithreading Pin
borono7-Apr-06 7:46
borono7-Apr-06 7:46 
GeneralRe: DLL - Multithreading Pin
Richard Andrew x647-Apr-06 8:01
professionalRichard Andrew x647-Apr-06 8:01 
AnswerRe: DLL - Multithreading Pin
Waldermort7-Apr-06 7:48
Waldermort7-Apr-06 7:48 
GeneralRe: DLL - Multithreading Pin
borono7-Apr-06 8:27
borono7-Apr-06 8:27 
GeneralRe: DLL - Multithreading Pin
Richard Andrew x647-Apr-06 9:04
professionalRichard Andrew x647-Apr-06 9:04 
GeneralRe: DLL - Multithreading Pin
borono7-Apr-06 11:58
borono7-Apr-06 11:58 
QuestionAlternative Shell for Windows Pin
Richard Andrew x647-Apr-06 5:15
professionalRichard Andrew x647-Apr-06 5:15 
AnswerRe: Alternative Shell for Windows Pin
James Brown7-Apr-06 6:31
James Brown7-Apr-06 6:31 
QuestionSetting a timer Pin
LCI7-Apr-06 4:54
LCI7-Apr-06 4:54 
AnswerRe: Setting a timer Pin
jhwurmbach7-Apr-06 5:20
jhwurmbach7-Apr-06 5:20 
QuestionRe: Setting a timer Pin
David Crow7-Apr-06 5:24
David Crow7-Apr-06 5:24 
AnswerRe: Setting a timer Pin
LCI7-Apr-06 5:45
LCI7-Apr-06 5:45 
Questionchain code Pin
izzah_mustapha7-Apr-06 4:28
izzah_mustapha7-Apr-06 4:28 
AnswerRe: chain code Pin
toxcct7-Apr-06 4:41
toxcct7-Apr-06 4:41 
AnswerRe: chain code Pin
Chris Losinger7-Apr-06 4:44
professionalChris Losinger7-Apr-06 4:44 
Questionconverting XML to string Pin
nahitan7-Apr-06 3:59
nahitan7-Apr-06 3:59 
QuestionMultiple OpenGL Problem..MFC 8.0 SDI Pin
BrownJacket7-Apr-06 3:55
BrownJacket7-Apr-06 3:55 

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.