Re: Passing VB.NET classes as arguments to VC7 DLLs.
"Patrick Ireland" <firstname.lastname@example.org> wrote in message
> 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
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.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL