Click here to Skip to main content
15,917,177 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Problem with memory Allocation and deallocation Pin
David Crow8-Nov-07 3:37
David Crow8-Nov-07 3:37 
AnswerRe: Problem with memory Allocation and deallocation Pin
Bram van Kampen10-Nov-07 16:02
Bram van Kampen10-Nov-07 16:02 
QuestionDLL_THREAD_ATTACH: Pin
ForNow7-Nov-07 16:34
ForNow7-Nov-07 16:34 
AnswerRe: DLL_THREAD_ATTACH: Pin
Matthew Faithfull7-Nov-07 23:05
Matthew Faithfull7-Nov-07 23:05 
GeneralRe: DLL_THREAD_ATTACH: Pin
ForNow8-Nov-07 1:13
ForNow8-Nov-07 1:13 
GeneralRe: DLL_THREAD_ATTACH: Pin
Matthew Faithfull8-Nov-07 2:05
Matthew Faithfull8-Nov-07 2:05 
GeneralRe: DLL_THREAD_ATTACH: Pin
ForNow8-Nov-07 13:53
ForNow8-Nov-07 13:53 
GeneralRe: DLL_THREAD_ATTACH: Pin
Matthew Faithfull8-Nov-07 22:27
Matthew Faithfull8-Nov-07 22:27 
Interesting question, I'm not sure but I guess the DLL Entry point may be called with DLL_ATTACH_THREAD first which will make it difficult to use your thread creation parameter. I suggest you use the C Runtime thread spawning commands documented here[^] and include the C Runtime source in the include directories of your project. Then you can debug the thread startup process and see if there's somewhere you can attached your control object. You may be able to access your thread parameter through the C Runtime before your thread start function is called.
The alternative is to use structures shared between threads, set up the data for the new thread in this structure (list, array or whatever ) before you launch the thread and use synchronisation objects to safely access the shared data from your secondary thread. This kind of arrangement would probably require a singleton thread factory to ensure that only one thread is created and handed off its data at a time. I have seen arrangements like this working in the past in distributed applications.

Nothing is exactly what it seems but everything with seems can be unpicked.

GeneralRe: DLL_THREAD_ATTACH: Pin
ForNow8-Nov-07 23:16
ForNow8-Nov-07 23:16 
QuestionPerformance & Profiling... Pin
Peter Weyzen7-Nov-07 15:17
Peter Weyzen7-Nov-07 15:17 
AnswerRe: Performance & Profiling... Pin
Nelek7-Nov-07 21:31
protectorNelek7-Nov-07 21:31 
AnswerRe: Performance & Profiling... Pin
Blake Miller16-Nov-07 5:14
Blake Miller16-Nov-07 5:14 
QuestionSimple question about DLLS Pin
bigdenny2007-Nov-07 12:33
bigdenny2007-Nov-07 12:33 
AnswerRe: Simple question about DLLS Pin
Mark Salsbery7-Nov-07 13:27
Mark Salsbery7-Nov-07 13:27 
AnswerRe: Simple question about DLLS Pin
toxcct7-Nov-07 23:15
toxcct7-Nov-07 23:15 
QuestionObtain a value from a variable in a class method. Pin
e40s7-Nov-07 11:47
e40s7-Nov-07 11:47 
QuestionRe: Obtain a value from a variable in a class method. Pin
David Crow7-Nov-07 16:56
David Crow7-Nov-07 16:56 
AnswerRe: Obtain a value from a variable in a class method. Pin
e40s8-Nov-07 3:21
e40s8-Nov-07 3:21 
GeneralRe: Obtain a value from a variable in a class method. Pin
toxcct8-Nov-07 3:28
toxcct8-Nov-07 3:28 
JokeRe: Obtain a value from a variable in a class method. Pin
David Crow8-Nov-07 3:30
David Crow8-Nov-07 3:30 
GeneralRe: Obtain a value from a variable in a class method. Pin
toxcct8-Nov-07 3:33
toxcct8-Nov-07 3:33 
GeneralRe: Obtain a value from a variable in a class method. [modified] Pin
e40s8-Nov-07 3:52
e40s8-Nov-07 3:52 
GeneralRe: Obtain a value from a variable in a class method. Pin
toxcct8-Nov-07 5:12
toxcct8-Nov-07 5:12 
GeneralRe: Obtain a value from a variable in a class method. Pin
e40s8-Nov-07 5:36
e40s8-Nov-07 5:36 
GeneralRe: Obtain a value from a variable in a class method. Pin
toxcct8-Nov-07 5:54
toxcct8-Nov-07 5:54 

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.