There are examples of this all over the OpenNetCF library. I'm not sure if
the site is back up or not, but it's
www.opennetcf.org. There are lots of
p/invoke examples in the archives of this newsgroup, also:
http://groups.google.com/groups?hl=e...mpactframework
Paul T.
"Thomas" <(E-Mail Removed)> wrote in message
news:uQCWl%(E-Mail Removed)...
> One way is to convert your parameters which are structure type into bytes
> arrays.
> You have to make a 2 functions :
> - one to transform your struct into an array of bytes in order to be
> sent to your DLL's functions
> - one to transform bytes arrays that you'll receive from your DLL into
> your managed structure
>
> Thomas.
>
> "tdcrotty" <(E-Mail Removed)> a écrit dans le message de
> news:0d8501c3a3ae$2bc5dbd0$(E-Mail Removed)...
> > Hi,
> >
> > I'm trying to use a custom dll written in C in my VB
> > program. The C library uses many structs but none are
> > very complicated. I cannot use MarshalAs to Marshal the
> > data.
> >
> > I'm wondering if anyone has experience with this and can
> > provide me with a couple of examples.
> >
> > Thanks,
> >
> > tdcrotty
>
>