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

Managed C++/CLI

 
QuestionProto type mismatch Pin
satsumatable22-May-06 23:57
satsumatable22-May-06 23:57 
QuestionReading memory Pin
satsumatable22-May-06 17:32
satsumatable22-May-06 17:32 
QuestionCreating new managedObject[100] in C++ Pin
StevenS_Dev22-May-06 12:35
StevenS_Dev22-May-06 12:35 
AnswerRe: Creating new managedObject[100] in C++ Pin
George L. Jackson23-May-06 2:01
George L. Jackson23-May-06 2:01 
GeneralRe: Creating new managedObject[100] in C++ Pin
StevenS_Dev23-May-06 7:38
StevenS_Dev23-May-06 7:38 
QuestionOverriding void Dispose(bool disposing) in C++/CLI? Pin
Filip Strugar20-May-06 14:37
Filip Strugar20-May-06 14:37 
AnswerRe: Overriding void Dispose(bool disposing) in C++/CLI? [modified] Pin
George L. Jackson20-May-06 15:44
George L. Jackson20-May-06 15:44 
AnswerRe: Overriding void Dispose(bool disposing) in C++/CLI? Pin
Dave Doknjas20-May-06 19:25
Dave Doknjas20-May-06 19:25 
If you're doing somthing like the following in C#:
public class test
{
protected override void Dispose(bool disposing)
{
if (disposing)
{
// do A
}

// do B
}
}

Then the C++/CLI equivalent is this:
public ref class test
{
public:
~test()
{
DisposeObject(true);
}

private protected:
!test()
{
DisposeObject(false);
}

private:
void DisposeObject(bool disposing)
{
if (disposing)
{
// do A
}

// do B
}
};

Our Instant C++ C# to C++ converter maintains the original 'Dispose' method, but renames it and makes it private - called only from the new CLI destructor and finalizer. This is to make conversion easier to understand, but you could dispense with the Dispose altogether and code that logic within the destructor and finalizer directly.


David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter and VB to C++ converter
Instant J#: VB to J# converter
Clear VB: Cleans up VB.NET code
Clear C#: Cleans up C# code
GeneralRe: Overriding void Dispose(bool disposing) in C++/CLI? Pin
Filip Strugar22-May-06 22:34
Filip Strugar22-May-06 22:34 
GeneralRe: Overriding void Dispose(bool disposing) in C++/CLI? Pin
George L. Jackson23-May-06 1:57
George L. Jackson23-May-06 1:57 
GeneralRe: Overriding void Dispose(bool disposing) in C++/CLI? Pin
Dave Doknjas23-May-06 12:31
Dave Doknjas23-May-06 12:31 
QuestionMixing native and managed code Pin
Saurabh.Garg19-May-06 18:44
Saurabh.Garg19-May-06 18:44 
AnswerRe: Mixing native and managed code Pin
georgeraafat23-May-06 12:50
georgeraafat23-May-06 12:50 
QuestionSerialization Issue with Int32 Pin
jmlstele19-May-06 9:51
jmlstele19-May-06 9:51 
AnswerRe: Serialization Issue with Int32 Pin
georgeraafat23-May-06 13:17
georgeraafat23-May-06 13:17 
GeneralRe: Serialization Issue with Int32 Pin
jmlstele29-May-06 1:22
jmlstele29-May-06 1:22 
QuestionUndocumented problem with for each Pin
jmlsteele19-May-06 9:14
jmlsteele19-May-06 9:14 
GeneralRe: Undocumented problem with for each Pin
jmlstele19-May-06 9:18
jmlstele19-May-06 9:18 
AnswerRe: Undocumented problem with for each Pin
Nish Nishant19-May-06 10:10
sitebuilderNish Nishant19-May-06 10:10 
QuestionIs it possible to write a parser which will find.... Pin
SasikumarRenjith19-May-06 1:23
SasikumarRenjith19-May-06 1:23 
AnswerRe: Is it possible to write a parser which will find.... Pin
Cedric Moonen19-May-06 3:54
Cedric Moonen19-May-06 3:54 
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 

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.