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

Managed C++/CLI

 
QuestionActiveX issue: ATL 8.0 text in IE Pin
birajendu5-Jan-12 19:32
birajendu5-Jan-12 19:32 
AnswerRe: ActiveX issue: ATL 8.0 text in IE Pin
John Schroedl6-Jan-12 4:48
professionalJohn Schroedl6-Jan-12 4:48 
GeneralRe: ActiveX issue: ATL 8.0 text in IE Pin
birajendu8-Jan-12 20:15
birajendu8-Jan-12 20:15 
QuestionUsing a webBrowser control to format process feedback. Pin
PapaGeek4-Jan-12 7:04
PapaGeek4-Jan-12 7:04 
AnswerRe: Using a webBrowser control to format process feedback. Pin
Luc Pattyn4-Jan-12 7:33
sitebuilderLuc Pattyn4-Jan-12 7:33 
AnswerRe: Using a webBrowser control to format process feedback. Pin
John Schroedl6-Jan-12 4:40
professionalJohn Schroedl6-Jan-12 4:40 
AnswerRe: Using a webBrowser control to format process feedback. Pin
Sam Hobbs13-Feb-12 19:22
Sam Hobbs13-Feb-12 19:22 
QuestionHow to marshal following native C++ objects to C++/CLI? Pin
Alok Jadhav3-Jan-12 19:55
Alok Jadhav3-Jan-12 19:55 
Hi Everyone,

I am new to C++/CLI. I am trying to write a CLI wrapper on top of native C++ class.

I am a bit confused on how to marshal below mentioned C++ object to c++/CLI. Could you give me some ideas?

Native C++ Classes

C++
class HeaderMessage {
    double timestamp;
    string ric_code;
}

class TradeMessage {
   double price;
   int size;
}

class RFARecord
 {
public:
    RFARecord();
    HeaderMessage * hMsg;
    list<TradeMessage *> qMsgs;
 };





My C++/CLI classes look like this

C++
public ref class RFARecordRef
{
public:
    RFARecordRef();
    RFARecordRef(RFARecord *record);
    HeaderMessageRef hMsg;
    List<TradeMessageRef> tMsgs;
private:
    RFARecord *record;
};

    ref class HeaderMessageRef
    {
    private:
        HeaderMessage *hMsg;
    public:
        HeaderMessageRef(void);
    };

    ref class TradeMessageRef
    {
    private:
        TradeMessage *tMsg;
    public:
        TradeMessageRef(void);
    };



I am not sure if my approach is correct.

I read data from a text file and transfer this data in the form of RFARecords to my C# program.

What is the right way to wrap or marshal above data objects to C++/CLI which can then be consumed by my C# program.

Thanks in advance.

Regards, Alok
QuestionHow to define the Image in Headerfile like this? VC++2010 Pin
Paramu197330-Dec-11 23:28
Paramu197330-Dec-11 23:28 
AnswerRe: How to define the Image in Headerfile like this? VC++2010 Pin
Richard MacCutchan31-Dec-11 1:26
mveRichard MacCutchan31-Dec-11 1:26 
GeneralRe: How to define the Image in Headerfile like this? VC++2010 Pin
Paramu197331-Dec-11 1:57
Paramu197331-Dec-11 1:57 
QuestionHow do I create a text box with formatted text? Pin
PapaGeek30-Dec-11 7:58
PapaGeek30-Dec-11 7:58 
AnswerRe: How do I create a text box with formatted text? Pin
Luc Pattyn30-Dec-11 9:36
sitebuilderLuc Pattyn30-Dec-11 9:36 
GeneralRe: How do I create a text box with formatted text? Pin
PapaGeek30-Dec-11 9:58
PapaGeek30-Dec-11 9:58 
AnswerRe: How do I create a text box with formatted text? Pin
Luc Pattyn30-Dec-11 10:38
sitebuilderLuc Pattyn30-Dec-11 10:38 
AnswerRe: How do I create a text box with formatted text? Pin
Sam Hobbs13-Feb-12 19:32
Sam Hobbs13-Feb-12 19:32 
QuestionHow to have the Modules like VB.Net to use Public variables & Functions in VC++2010? Pin
Paramu197328-Dec-11 21:06
Paramu197328-Dec-11 21:06 
AnswerRe: How to have the Modules like VB.Net to use Public variables & Functions in VC++2010? Pin
Richard MacCutchan28-Dec-11 21:42
mveRichard MacCutchan28-Dec-11 21:42 
GeneralRe: How to have the Modules like VB.Net to use Public variables & Functions in VC++2010? Pin
Paramu197328-Dec-11 22:40
Paramu197328-Dec-11 22:40 
QuestionHow to have a Excel Cell Value vc++2010? Pin
Paramu197325-Dec-11 4:55
Paramu197325-Dec-11 4:55 
AnswerRe: How to have a Excel Cell Value vc++2010? Pin
Paramu197325-Dec-11 20:32
Paramu197325-Dec-11 20:32 
QuestionHow to add reference for Microsoft.Office.Interop.Excel in Visual C++2010 ? Pin
Paramu197324-Dec-11 4:33
Paramu197324-Dec-11 4:33 
AnswerRe: How to add reference for Microsoft.Office.Interop.Excel in Visual C++2010 ? Pin
Richard MacCutchan24-Dec-11 6:18
mveRichard MacCutchan24-Dec-11 6:18 
QuestionCutePDF writer generates PS not PDF Pin
susan1246821-Dec-11 12:33
susan1246821-Dec-11 12:33 
AnswerRe: CutePDF writer generates PS not PDF Pin
Richard MacCutchan21-Dec-11 22:13
mveRichard MacCutchan21-Dec-11 22:13 

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.