"Patrick Ireland" <ireland@airmail.net> wrote in message
news:3aa0579c$1@news.devx.com...
>
> I have encountered a problem with passing data elements in a class to
> a DLL. The data is marshalled and sequential so the data appears correct
> to the DLL however when I update field in the DLL the change is not
> mapped back to the VB7 app.

....

> What did I miss?


You are passing the structure by-value(a copy is placed on the stack), not
by reference, thus the copy worked with on the VC7 side is not the one on
the VB.NET side, so your changes will not, and should not, be reflected
back.

If you change the C++ function to tkae a pointer to this structure (or a
reference), and then change the declaration in your vb code to be byref, you
should get the behavior you are expecting.