Click here to Skip to main content
16,008,299 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CWnd text editor Pin
alex.barylski18-Jan-02 21:02
alex.barylski18-Jan-02 21:02 
GeneralMemory Allocation Issues - MultiThreaded/MultiProcessor Pin
Peter Weyzen18-Jan-02 7:31
Peter Weyzen18-Jan-02 7:31 
GeneralRe: Memory Allocation Issues - MultiThreaded/MultiProcessor Pin
Joao Vaz18-Jan-02 7:58
Joao Vaz18-Jan-02 7:58 
Questionhow can i create ODBC DSN programetically? Pin
anju18-Jan-02 6:56
anju18-Jan-02 6:56 
AnswerRe: how can i create ODBC DSN programetically? Pin
Cliff Dabrowski18-Jan-02 7:55
Cliff Dabrowski18-Jan-02 7:55 
AnswerRe: how can i create ODBC DSN programetically? Pin
Jamie Hale18-Jan-02 8:57
Jamie Hale18-Jan-02 8:57 
GeneralRe: Thanks i got the solution with SQLConfigDataSource. Pin
anju19-Jan-02 20:44
anju19-Jan-02 20:44 
GeneralMultiple loaded DLL problem Pin
Steve The Plant18-Jan-02 6:08
Steve The Plant18-Jan-02 6:08 
Hey!

Some background first: I've written an app that has a plugin system.
Each plugin contains a CDialog. I enumerate all the plugin dll's in a
certain folder and init each one, storing their HMODULE handles and
other information in an array. Each plugin has an item in
the "plugin" menu and a check marks weather the a certain plugin is
activated. All of this works great and I have no problems with it.

The problem comes from when I want to shutdown one of the plugins.
Depending on the order the plugins were loaded, if I shut down
one plugin, it does so properly, but all the others dissapear. The
other plugins don't get shutdown, their HWND becomes NULL and
consequently, their windows vanish.

I've traced the code to the point where this all happens, and
a FreeLibrary() call seems to be the culprit. As soon as that
function is called with the HMODULE of the plugin I want to free,
all the others dissapear. Now I do have functions in each plugin
that free memory and things like that, but as a rule plugins don't
know anything about each other. They should be self-contained ie
one plugin shouldn't be able to affect another. That's why I think
that there might be some weird stuff happening deep down in MFC or
Windows, but I have no idea what.

Any suggestions?

Steve The Plant
GeneralRe: Multiple loaded DLL problem Pin
Roger Allen18-Jan-02 6:19
Roger Allen18-Jan-02 6:19 
GeneralRe: Multiple loaded DLL problem Pin
Steve The Plant18-Jan-02 10:00
Steve The Plant18-Jan-02 10:00 
GeneralRe: Multiple loaded DLL problem Pin
Joaquín M López Muñoz18-Jan-02 10:03
Joaquín M López Muñoz18-Jan-02 10:03 
GeneralRe: Multiple loaded DLL problem Pin
Steve The Plant18-Jan-02 10:38
Steve The Plant18-Jan-02 10:38 
GeneralRe: Multiple loaded DLL problem Pin
Joaquín M López Muñoz18-Jan-02 10:37
Joaquín M López Muñoz18-Jan-02 10:37 
GeneralRe: Multiple loaded DLL problem Pin
Roger Allen21-Jan-02 0:36
Roger Allen21-Jan-02 0:36 
GeneralUsing _beginthreadex in an MFC dll Pin
PaulJ18-Jan-02 6:05
PaulJ18-Jan-02 6:05 
GeneralRe: Using _beginthreadex in an MFC dll Pin
Nish Nishant18-Jan-02 7:02
sitebuilderNish Nishant18-Jan-02 7:02 
GeneralRe: Using _beginthreadex in an MFC dll Pin
PaulJ18-Jan-02 7:19
PaulJ18-Jan-02 7:19 
GeneralRe: Using _beginthreadex in an MFC dll Pin
Michael Dunn18-Jan-02 7:43
sitebuilderMichael Dunn18-Jan-02 7:43 
GeneralRe: Using _beginthreadex in an MFC dll Pin
Ernest Laurentin18-Jan-02 8:58
Ernest Laurentin18-Jan-02 8:58 
GeneralRe: Using _beginthreadex in an MFC dll Pin
Nish Nishant18-Jan-02 15:17
sitebuilderNish Nishant18-Jan-02 15:17 
GeneralRe: Using _beginthreadex in an MFC dll Pin
Joaquín M López Muñoz18-Jan-02 7:56
Joaquín M López Muñoz18-Jan-02 7:56 
GeneralRe: Using _beginthreadex in an MFC dll Pin
Nish Nishant18-Jan-02 15:14
sitebuilderNish Nishant18-Jan-02 15:14 
GeneralRe: Using _beginthreadex in an MFC dll Pin
Tim Deveaux18-Jan-02 8:19
Tim Deveaux18-Jan-02 8:19 
GeneralRe: Using _beginthreadex in an MFC dll Pin
Nish Nishant18-Jan-02 15:16
sitebuilderNish Nishant18-Jan-02 15:16 
GeneralRe: Using _beginthreadex in an MFC dll Pin
Michael Dunn18-Jan-02 16:41
sitebuilderMichael Dunn18-Jan-02 16:41 

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.