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

C / C++ / MFC

 
QuestionRe: displaying the directories on a combo box Pin
David Crow15-Oct-07 7:18
David Crow15-Oct-07 7:18 
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 
Hi,

I'm reading documentation about Libraries and how to load, detach them. But I have some concept doubts about.

I have a point in my program where I have to use some functions that should be programmed in a Dll to avoid having that functions in computers where we have not delivered this dll. So when needed, the user should click on a button and search the dll. If the dll is there, then I save the returned name/path of the CFileDialog and set a variable like "m_bLibraryLoadedOK". Afterwards, when the other button is pressed and depending on that bool, I give an error message or use the LoadLibrary function with the saved name/path, use the function I will have in the DLL, and when all is ready... I want to unload the library.

And it now is where I have the doubts.

For example I don't correctly understand the bold part in the following quote: "The Visual C++ compiler supports a syntax that enables you to declare thread-local variables: _declspec(thread). If you use this syntax in a DLL, you will not be able to load the DLL explicitly using LoadLibrary or LoadLibraryEx. If your DLL will be loaded explicitly, you must use the thread local storage functions instead of _declspec(thread)."

The function in the dll is going to need just one variable from my main programm, a pointer/reference to a buffer with the data that have to be written in the PLC. All the other things (if needed) will be local. Should I worry about the quote above? What „key words“ should I look for?

And…

When I load the dll. Is a thread being automatically created? Will the FreeLibrary enough at the end of my function to unload the library? Or will I have to use more things (Like the DLLMain)??


Any tip or Keyword to look for and help me undertand the thema will be apreciated.

Greetings.

--------
M.D.V.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

Help me to understand what I'm saying, and I'll explain it better to you

Wink | ;)

AnswerRe: About DLL and Threads Pin
Matthew Faithfull14-Oct-07 23:58
Matthew Faithfull14-Oct-07 23:58 
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 

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.