complicated P/Invoke and marshaling

  • Thread starter Thread starter c_xyTopa
  • Start date Start date
C

c_xyTopa

hi all!
i have a c++ function, wich has to be invoked from c#.
c++ function looks like that:

uint Function(const Request* a, uint max, Result** b, const Result *c,
uint* d, void *cb)

typedef struct{
uint a,
wchar_t b,
Position p,
Position* p,
uint *c
}Request;

typedef struct{
uint a,
uint b
}Position;


1. how do i declare that function?
2. how do i declare the structs?
3. the other question is how i use the declared function?
i need to declare struct Request and pass a reference to a struct as
first parameter. the third parameter expects a reference to the pointer
to the struct. How can i solve that?

thanx in advance
 
i've read their are limits of parameter pasing.
one of them is passing structcs that contain structs or unions.

are those limitations not effective in CF 2.0?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top