can anyone provide me a link to pass structure for C++/CLI .
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Shweta LodhaPosted Mar 1, 2014, 7:25 AM
http://stackoverflow.com/questions/5375370/wrapper-for-dotnet-to-native-written-in-c-cli-bestway-to-pass-strutures?rq=1
VulpesPosted Mar 16, 2014, 5:17 PM
Graeme PariotPosted Mar 16, 2014, 5:08 PM
I want to pass sctructure from C# to C++ layer and code is something similar to this:
\\C++
typedef struct
{
INFO16 A;
INFO8 B;
INFO8 C;
INFO8 D;
INFO8 E;
}
DATA;
\\C++/CLI
[StructLayout(LayoutKind::Explicit)]
public value struct DATA
{
public:
[FieldOffset(0)]
UInt16 A;
[FieldOffset(2)]
Byte B;
[FieldOffset(3)]
Byte C;
[FieldOffset(4)]
Byte D;
[FieldOffset(5)]
Byte E;
};
VulpesPosted Mar 16, 2014, 4:57 PM
Graeme PariotPosted Mar 16, 2014, 4:35 PM
Thanks for your answer, but I am looking for C++/CLI and not for C++.
Ehtesham MehmoodPosted Mar 1, 2014, 9:47 AM
http://stackoverflow.com/questions/19400349/how-to-pass-structure-to-function-in-c