>How do I declare that second structure in C#?
You could do it like this
struct bufferStruct{
public int count;
public IntPtr newBuffer;
}
Then use Marshal.ReadIntPtr to dereference to one or more subbuffer*,
and finally Marhal.ReadInt32 to read the format value if subbuffer
really only consists of a single int.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
kat - 18 Oct 2004 14:45 GMT
Thanks for the response, Mattias.
The actual problem that I am having is not reading it in my C# code. The
function is called in the C library. When I am debuggin, the only value that
isn't showing up properly in the function call is that integer. I can see
the integer value in the C# code, but when it gets to the library the value I
see is an 8 digit number that is never the value I set. How do I get it so
that I can see the correct value in the C code?
Thanks,
kat
"Mattias Sjögren" wrote:
> >How do I declare that second structure in C#?
>
[quoted text clipped - 10 lines]
>
> Mattias