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

Managed C++/CLI

 
GeneralUsing a CWnd from a .NET System::Windows::Forms::UserControl Pin
lfmacias12-Jan-05 6:53
lfmacias12-Jan-05 6:53 
Generaldelete question Pin
Yaakov Davis12-Jan-05 1:08
Yaakov Davis12-Jan-05 1:08 
GeneralRe: delete question Pin
Steve Maier1-Feb-05 10:18
professionalSteve Maier1-Feb-05 10:18 
GeneralFlash and MFC HELP! Pin
FayezElFar11-Jan-05 11:00
FayezElFar11-Jan-05 11:00 
GeneralRe: Flash and MFC HELP! Pin
Christian Graus11-Jan-05 14:35
protectorChristian Graus11-Jan-05 14:35 
GeneralRe: Flash and MFC HELP! Pin
Uwe Keim23-Jan-05 1:48
sitebuilderUwe Keim23-Jan-05 1:48 
GeneralRe: Flash and MFC HELP! Pin
Christian Graus23-Jan-05 9:58
protectorChristian Graus23-Jan-05 9:58 
GeneralObject disposed in Finalize method Pin
Member 134623511-Jan-05 6:24
Member 134623511-Jan-05 6:24 
Hi guys,
I've implementing a simple class that creates a mutex and release it in the destructor (finalize), but everytime the application is closing a ObjectDisposedException is thrown. Source code here:

public __gc class SingleInstance
{
public:
SingleInstance(String *mutexName) {
m_mutex = new Mutex(false, mutexName);
}
virtual ~SingleInstance(void) {
if (m_mutex)
m_mutex->ReleaseMutex(); <--- !exception here!
}

public:
bool IsAnotherInstanceRunning() { return !m_mutex->WaitOne(10,true); }
private:
Mutex *m_mutex;
};

Can anyone of you tellme why this is happening? m_mutex is not supposed to be already disposed! Should I avoid dispose of m_mutex object? How?

Regards and thanx in advance,
Francesco
GeneralAccessing Unmanaged C++ from C# Pin
jstedman11-Jan-05 5:54
jstedman11-Jan-05 5:54 
Generalrtf help Pin
Mohammad Daba'an10-Jan-05 22:28
Mohammad Daba'an10-Jan-05 22:28 
GeneralRe: rtf help Pin
Christian Graus11-Jan-05 14:37
protectorChristian Graus11-Jan-05 14:37 
Generaladding to integers together... help please!!! Pin
alexy2u8-Jan-05 8:44
alexy2u8-Jan-05 8:44 
GeneralRe: adding to integers together... help please!!! Pin
Christian Graus8-Jan-05 16:00
protectorChristian Graus8-Jan-05 16:00 
GeneralRe: adding to integers together... help please!!! Pin
FayezElFar11-Jan-05 11:04
FayezElFar11-Jan-05 11:04 
GeneralRe: adding to integers together... help please!!! Pin
prophets_lie16-Jan-05 18:17
prophets_lie16-Jan-05 18:17 
GeneralRe: adding to integers together... help please!!! Pin
Anders Dalvander29-Jan-05 1:25
Anders Dalvander29-Jan-05 1:25 
Generalsetup wizard Pin
Boniolopez8-Jan-05 4:48
Boniolopez8-Jan-05 4:48 
GeneralC++ arrays Pin
Ail6-Jan-05 9:19
Ail6-Jan-05 9:19 
Generaloperator[] in 2.0 Pin
Yaakov Davis5-Jan-05 13:20
Yaakov Davis5-Jan-05 13:20 
GeneralRe: operator[] in 2.0 Pin
Bill Gafford19-Jan-05 9:46
Bill Gafford19-Jan-05 9:46 
GeneralDetecting the phone number from C++ Pin
Bharat Gidde5-Jan-05 6:20
Bharat Gidde5-Jan-05 6:20 
GeneralRe: Detecting the phone number from C++ Pin
Christian Graus5-Jan-05 11:45
protectorChristian Graus5-Jan-05 11:45 
GeneralRe: Detecting the phone number from C++ Pin
Maximilien6-Jan-05 9:42
Maximilien6-Jan-05 9:42 
GeneralMirror Text Pin
dado745-Jan-05 2:47
dado745-Jan-05 2:47 
GeneralRe: Mirror Text Pin
Christian Graus5-Jan-05 11:46
protectorChristian Graus5-Jan-05 11:46 

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.