callbacks in unmanaged code

V

vijaya

I've to invoke a unmanaged dll fucntion in C# which uses
a callback fucntion.The unmanaged dll fucntion returns a
pointer to a structure to its callback fucntion.The user
should collect those structure fields in a buffer.

In my managed code(i.e. in C# program), I've used a
delegate for invoking callback function and I've declared
the structure too. The dll fucntion is executing finely
without any errors but I'm not getting any values into the
structure of my callback fucntion.

I've gone through the MSDN examples for PInvoke.
But I couldn't find examples of callbacks which take in
structure pointers

Please suggest me a solution of using callbacks of
Unmanaged code which take in a pointer to a struture.

Please send few code snippets which involve callbacks with
structure variables.

I need the information at the earliest.
 
M

Mattias Sjögren

Please send few code snippets which involve callbacks with
structure variables.

Why don't you post your code instead (including the native structure
and function declarations). That would make it a lot easier to
understand exactly what the problem is.



Mattias
 

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

Top