|
-
December 3rd, 2009, 04:10 PM
#1
C# wrapper, C++ struct containing CList
I have a C++ DLL using MFC and I need to wrap all the exported functions so they can be used by a C# .NET front end. For functions taking CStrings, ints, etc this isn't a problem. However, I have some functions which take a struct as a parameter. The problem is, the struct contains a CList of another struct...for example:
Code:
struct SOne
{
CString str1;
long l1;
CString s2;
int i1;
};
struct STwo
{
CList <struct SOne,struct SOne&> myList;
CString str1;
int i2;
};
//The exported function looks like this (export syntax left out for simplicity)
long DoSomthing(struct STwo* me);
So how do I marshal the data for STwo within my wrapper so that DoSomething can be called from a C# front end?
Sorry if I'm using incorrect terminology. I'm a C++ programmer just now venturing into C# so all the C# syntax is new to me.
Thanks in advance for your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|