Click here to Skip to main content
15,905,915 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionInvoking Event Handlers Programmatically? Pin
TheBerk7-Apr-10 11:18
TheBerk7-Apr-10 11:18 
AnswerRe: Invoking Event Handlers Programmatically? Pin
Andreoli Carlo7-Apr-10 23:04
professionalAndreoli Carlo7-Apr-10 23:04 
GeneralRe: Invoking Event Handlers Programmatically? Pin
TheBerk8-Apr-10 3:55
TheBerk8-Apr-10 3:55 
GeneralRe: Invoking Event Handlers Programmatically? Pin
Andreoli Carlo8-Apr-10 20:54
professionalAndreoli Carlo8-Apr-10 20:54 
AnswerRe: Invoking Event Handlers Programmatically? Pin
Luc Pattyn8-Apr-10 4:52
sitebuilderLuc Pattyn8-Apr-10 4:52 
GeneralRe: Invoking Event Handlers Programmatically? Pin
TheBerk8-Apr-10 5:05
TheBerk8-Apr-10 5:05 
GeneralRe: Invoking Event Handlers Programmatically? Pin
Luc Pattyn8-Apr-10 5:15
sitebuilderLuc Pattyn8-Apr-10 5:15 
QuestionHow to unload mixed-mode MFC assembly loaded in AppDomain Pin
catrill5-Apr-10 17:31
catrill5-Apr-10 17:31 
We have been bringing our old C++ code that uses MFC into the .NET world by compiling it into a mixed-mode assembly. We have found that when this assembly is loaded in an AppDomain e.g. by NUnit or by ASP .NET, the dll is not unloaded when the AppDomain is unloaded. The host application can load the dll many times, and may eventually run out of memory.

I have found that this is due to static data. If I make a simple mixed mode assembly with no static data, or with a static object with a default constructor, the dll is unloaded correctly. If the object has a non-trivial constructor, then the dll is not unloaded.

Even the simplest MFC dll has a static CWinApp derived object, so I don't think it would be possible to remove this kind of static data from our mixed-mode dll without a removing its dependency on MFC (a task that is too big to contemplate at the moment). Is there any other way to force the mixed-mode dll to be freed when the AppDomain is unloaded?
Questionunable to call function in CLI/C++ dll from native C++, when linked Explicitly Pin
Cherry_manju4-Apr-10 23:51
Cherry_manju4-Apr-10 23:51 
AnswerRe: unable to call function in CLI/C++ dll from native C++, when linked Explicitly Pin
N a v a n e e t h5-Apr-10 15:44
N a v a n e e t h5-Apr-10 15:44 
Questionglobal access to objects / instances Pin
KlaasVersteeg31-Mar-10 2:31
KlaasVersteeg31-Mar-10 2:31 
AnswerRe: global access to objects / instances Pin
Richard MacCutchan31-Mar-10 2:46
mveRichard MacCutchan31-Mar-10 2:46 
GeneralRe: global access to objects / instances Pin
KlaasVersteeg31-Mar-10 2:59
KlaasVersteeg31-Mar-10 2:59 
GeneralRe: global access to objects / instances Pin
Richard MacCutchan31-Mar-10 3:07
mveRichard MacCutchan31-Mar-10 3:07 
GeneralRe: global access to objects / instances Pin
KlaasVersteeg31-Mar-10 3:25
KlaasVersteeg31-Mar-10 3:25 
GeneralRe: global access to objects / instances Pin
Richard MacCutchan31-Mar-10 3:46
mveRichard MacCutchan31-Mar-10 3:46 
GeneralRe: global access to objects / instances Pin
KlaasVersteeg31-Mar-10 3:53
KlaasVersteeg31-Mar-10 3:53 
GeneralRe: global access to objects / instances Pin
Richard MacCutchan31-Mar-10 4:25
mveRichard MacCutchan31-Mar-10 4:25 
GeneralRe: global access to objects / instances Pin
KlaasVersteeg31-Mar-10 4:37
KlaasVersteeg31-Mar-10 4:37 
GeneralRe: global access to objects / instances Pin
Richard MacCutchan31-Mar-10 5:53
mveRichard MacCutchan31-Mar-10 5:53 
GeneralRe: global access to objects / instances Pin
KlaasVersteeg31-Mar-10 6:39
KlaasVersteeg31-Mar-10 6:39 
GeneralRe: global access to objects / instances Pin
Richard MacCutchan31-Mar-10 7:12
mveRichard MacCutchan31-Mar-10 7:12 
Questioncannot convert from 'System::Data::DataSet ^' to 'System::Data::DataSet error Pin
m_mun31-Mar-10 0:31
m_mun31-Mar-10 0:31 
AnswerRe: cannot convert from 'System::Data::DataSet ^' to 'System::Data::DataSet error Pin
Andreoli Carlo31-Mar-10 3:34
professionalAndreoli Carlo31-Mar-10 3:34 
GeneralRe: cannot convert from 'System::Data::DataSet ^' to 'System::Data::DataSet error Pin
m_mun31-Mar-10 5:37
m_mun31-Mar-10 5:37 

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.