Click here to Skip to main content
16,004,927 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionHow do I Convert Struct to ByteArray in .net 2005 Pin
ShayD118-May-06 6:32
ShayD118-May-06 6:32 
AnswerRe: How do I Convert Struct to ByteArray in .net 2005 Pin
2bee 18-May-06 11:37
2bee 18-May-06 11:37 
Questionporting managed c++ from vs2003 to vs2005 Pin
Hohenloher16-May-06 21:50
Hohenloher16-May-06 21:50 
AnswerRe: porting managed c++ from vs2003 to vs2005 Pin
George L. Jackson17-May-06 4:43
George L. Jackson17-May-06 4:43 
GeneralRe: porting managed c++ from vs2003 to vs2005 Pin
Hohenloher17-May-06 21:38
Hohenloher17-May-06 21:38 
GeneralRe: porting managed c++ from vs2003 to vs2005 Pin
George L. Jackson18-May-06 0:34
George L. Jackson18-May-06 0:34 
GeneralRe: porting managed c++ from vs2003 to vs2005 Pin
Nemanja Trifunovic18-May-06 6:31
Nemanja Trifunovic18-May-06 6:31 
AnswerRe: porting managed c++ from vs2003 to vs2005 Pin
George L. Jackson18-May-06 11:02
George L. Jackson18-May-06 11:02 
I believe your problem might be on how you set up your class to process disposal of resources. Make sure your class looks something like the following:

__gc class Test : public IDisposable
{
public:
Test() : disposed(false)
{
Console::WriteLine(__FUNCSIG__);
}

~Test()
{
Console::WriteLine(__FUNCSIG__);
Dispose(false);
}

void Dispose()
{
Console::WriteLine(__FUNCSIG__);
Dispose(true);
GC::SuppressFinalize(this);
}

private:

void Dispose(bool disposing)
{
Console::WriteLine(__FUNCSIG__);

if (!this->disposed)
{
if (disposing)
{
Console::WriteLine(S"Disposing managed resources");
}

Console::WriteLine(S"Cleaning up unmanaged resources");
}

disposed = true;
}

bool disposed;
};

I was able to execute Test::Dispose() without any problems. I complied this first in 2003 and did the wizard migration to 2005. The resulting command line:

/O2 /D "WIN32" /D "NDEBUG" /D "_VC80_UPGRADE=0x0710" /D "_MBCS" /FD /EHa /MD /Yu"stdafx.h" /Fp"Release\McppOld.pch" /Fo"Release\\" /Fd"Release\vc80.pdb" /W3 /nologo /c /Zi /clr:oldSyntax /TP /errorReport:prompt /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll" /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll"


Geo

-- modified at 19:25 Thursday 18th May, 2006
QuestionGeneration of Class Diagrams Pin
madhusri16-May-06 5:37
madhusri16-May-06 5:37 
GeneralRe: Generation of Class Diagrams Pin
George L. Jackson17-May-06 10:43
George L. Jackson17-May-06 10:43 
QuestionSkins for MFC applications Pin
AryaSoft15-May-06 10:01
AryaSoft15-May-06 10:01 
AnswerRe: Skins for MFC applications Pin
Maximilien15-May-06 10:45
Maximilien15-May-06 10:45 
QuestionUsing unmanaged DLL functions/struct in C# Pin
__makaveli__15-May-06 2:34
__makaveli__15-May-06 2:34 
AnswerRe: Using unmanaged DLL functions/struct in C# Pin
led mike15-May-06 5:37
led mike15-May-06 5:37 
QuestionDLL files and other methods Pin
Cantona2k14-May-06 14:32
Cantona2k14-May-06 14:32 
AnswerRe: DLL files and other methods Pin
Nemanja Trifunovic15-May-06 1:37
Nemanja Trifunovic15-May-06 1:37 
GeneralRe: DLL files and other methods Pin
Cantona2k15-May-06 2:52
Cantona2k15-May-06 2:52 
GeneralRe: DLL files and other methods Pin
Nemanja Trifunovic15-May-06 6:32
Nemanja Trifunovic15-May-06 6:32 
Questionpath to a leaf in a BST Pin
superboyy14-May-06 2:01
superboyy14-May-06 2:01 
QuestionDrawe Bar Chart with GLUT Pin
abdul_hayee12-May-06 3:47
abdul_hayee12-May-06 3:47 
QuestionHTTP GET & POST Pin
Mridang Agarwalla12-May-06 0:26
Mridang Agarwalla12-May-06 0:26 
AnswerRe: HTTP GET & POST Pin
Milton Karimbekallil12-May-06 2:31
Milton Karimbekallil12-May-06 2:31 
AnswerRe: HTTP GET & POST Pin
ThatsAlok16-May-06 2:55
ThatsAlok16-May-06 2:55 
Questionuse of extern Pin
Shamnar11-May-06 19:12
Shamnar11-May-06 19:12 
AnswerRe: use of extern Pin
_AnsHUMAN_ 12-May-06 1:06
_AnsHUMAN_ 12-May-06 1:06 

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.