Unmanaged Struct Instance in Managed Class

Posted by HeHasMoments on Stack Overflow See other posts from Stack Overflow or by HeHasMoments
Published on 2010-05-26T10:41:54Z Indexed on 2010/05/27 23:41 UTC
Read the original article Hit count: 229

Hi,

I've got a fairly specific problem i've been struggling with for a couple of days.

I'm using a native C++, one of the methods takes a ptr to a struct containing fixed size char arrays.

e.g.

struct userData {
    char data1[10];
    char data2[10];
};

method:

short AddItem(long id, userData* data);

I'm trying to call to call this from Managed VC++ but I need to have an instance of userData I can keep hold of in my managed class.

Can anyone help with how to achieve this?

Thanks

© Stack Overflow or respective owner

Related posts about visual-studio

Related posts about c++-cli