|
-
Re: Passing VB.NET classes as arguments to VC7 DLLs.
"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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
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
|
Bookmarks