Click here to Skip to main content
15,915,093 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhistory Pin
revanth198515-Oct-07 0:08
revanth198515-Oct-07 0:08 
AnswerRe: history Pin
Roger Broomfield15-Oct-07 0:38
Roger Broomfield15-Oct-07 0:38 
QuestionIdentifying SDI/MDI/Dialog based Pin
shir_k14-Oct-07 23:57
shir_k14-Oct-07 23:57 
AnswerRe: Identifying SDI/MDI/Dialog based Pin
Nibu babu thomas15-Oct-07 0:32
Nibu babu thomas15-Oct-07 0:32 
QuestionCTaskbarNotifier looking bad on Vista [modified] Pin
_alav_14-Oct-07 23:57
_alav_14-Oct-07 23:57 
QuestionHELP: split up source file into segments automatically.... Pin
andrewwan198014-Oct-07 23:46
andrewwan198014-Oct-07 23:46 
QuestionAbout DLL and Threads Pin
Nelek14-Oct-07 23:45
protectorNelek14-Oct-07 23:45 
AnswerRe: About DLL and Threads Pin
Matthew Faithfull14-Oct-07 23:58
Matthew Faithfull14-Oct-07 23:58 
Nelek wrote:
When I load the dll. Is a thread being automatically created?


No. You can load and call functions in a Dll on the same single main thread of your program. Use of Dlls doesn't require multiple or secondary threads, it's just function calls.


Nelek wrote:
Will the FreeLibrary enough at the end of my function to unload the library?


Yes. You can't gaurentee Windows will actually unload it, Windows is lazy but it makes no difference, you can treat it as having been unloaded.


Nelek wrote:
Should I worry about the quote above?


No. Not in this case. It only affects variables declared in the Dll with __declspec(thread) where the Dll doesn't have it's own statically linked copy of the C Library, i.e. it isn't already linked with LIBCMT or one of ts variants before you use it.
The explanation of this is that __declspec(thread) inserts an entry in a special data table that is used by the C Library startup routines to setup up Thread Local Storage variables. If the C Library startup doesn't run after your Dll is loaded because it dones't have it's C Library instance then this initialisation never happens and your __declspec(thread) variables are invalid.


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

GeneralRe: About DLL and Threads [SOLVED] Pin
Nelek15-Oct-07 4:00
protectorNelek15-Oct-07 4:00 
QuestionFolder Permissions Pin
narayanagvs14-Oct-07 23:15
narayanagvs14-Oct-07 23:15 
AnswerRe: Folder Permissions Pin
David Crow15-Oct-07 4:06
David Crow15-Oct-07 4:06 
GeneralRe: Folder Permissions Pin
narayanagvs15-Oct-07 4:19
narayanagvs15-Oct-07 4:19 
Questionhow to terminate continuous running program by clicking button on MFC dialog based window in C++ Pin
Thinn Nwe Han14-Oct-07 23:09
Thinn Nwe Han14-Oct-07 23:09 
AnswerRe: how to terminate continuous running program by clicking button on MFC dialog based window in C++ Pin
chandu00415-Oct-07 0:41
chandu00415-Oct-07 0:41 
GeneralRe: how to terminate continuous running program by clicking button on MFC dialog based window in C++ Pin
Thinn Nwe Han15-Oct-07 16:02
Thinn Nwe Han15-Oct-07 16:02 
QuestionRe: how to terminate continuous running program by clicking button on MFC dialog based window in C++ Pin
David Crow15-Oct-07 4:09
David Crow15-Oct-07 4:09 
AnswerRe: how to terminate continuous running program by clicking button on MFC dialog based window in C++ Pin
Thinn Nwe Han15-Oct-07 15:58
Thinn Nwe Han15-Oct-07 15:58 
GeneralRe: how to terminate continuous running program by clicking button on MFC dialog based window in C++ Pin
David Crow15-Oct-07 16:04
David Crow15-Oct-07 16:04 
QuestionButtons Pin
mcsherry14-Oct-07 23:02
mcsherry14-Oct-07 23:02 
AnswerRe: Buttons [modified] Pin
Roger Broomfield14-Oct-07 23:17
Roger Broomfield14-Oct-07 23:17 
GeneralRe: Buttons Pin
mcsherry14-Oct-07 23:46
mcsherry14-Oct-07 23:46 
GeneralRe: Buttons Pin
Roger Broomfield14-Oct-07 23:58
Roger Broomfield14-Oct-07 23:58 
GeneralRe: Buttons Pin
mcsherry15-Oct-07 0:21
mcsherry15-Oct-07 0:21 
GeneralRe: Buttons Pin
David Crow15-Oct-07 4:12
David Crow15-Oct-07 4:12 
Questionerror : class redifinition Pin
srvsah14-Oct-07 21:55
srvsah14-Oct-07 21: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.